Commit aae0aefb authored by Russ Cox's avatar Russ Cox

codereview: handle spaces and other unexpected chars in nicknames

R=r
https://golang.org/cl/157053
parent d05fa26a
...@@ -1351,7 +1351,9 @@ def DownloadCL(ui, repo, clname): ...@@ -1351,7 +1351,9 @@ def DownloadCL(ui, repo, clname):
# The author is just a nickname: get the real email address. # The author is just a nickname: get the real email address.
try: try:
data = MySend("/user_popup/" + nick, force_auth=False) # want URL-encoded nick, but without a=, and rietveld rejects + for %20.
url = "/user_popup/" + urllib.urlencode({"a": nick})[2:].replace("+", "%20")
data = MySend(url, force_auth=False)
except: except:
ui.warn("error looking up %s: %s\n" % (nick, ExceptionDetail())) ui.warn("error looking up %s: %s\n" % (nick, ExceptionDetail()))
cl.original_author = nick+"@needtofix" cl.original_author = nick+"@needtofix"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment