Commit eea25730 authored by Russ Cox's avatar Russ Cox

fix handling of escaped characters like ' " & < >

R=r
http://go/go-review/1013007
parent 79a63728
...@@ -618,7 +618,8 @@ def mail(ui, repo, *pats, **opts): ...@@ -618,7 +618,8 @@ def mail(ui, repo, *pats, **opts):
pmsg = "Hello " + JoinComma(cl.reviewer) + ",\n" pmsg = "Hello " + JoinComma(cl.reviewer) + ",\n"
pmsg += "\n" pmsg += "\n"
pmsg += "I'd like you to review the following change.\n" pmsg += "I'd like you to review the following change.\n"
PostMessage(cl.name, pmsg, send_mail="checked", subject="code review: " + line1(cl.desc)) subject = "code review %s: %s" % (cl.name, line1(cl.desc))
PostMessage(cl.name, pmsg, send_mail="checked", subject=subject)
def submit(ui, repo, *pats, **opts): def submit(ui, repo, *pats, **opts):
"""submit change to remote repository """submit change to remote repository
...@@ -835,9 +836,7 @@ class FormParser(HTMLParser): ...@@ -835,9 +836,7 @@ class FormParser(HTMLParser):
self.curtag = None self.curtag = None
self.curdata = None self.curdata = None
def handle_charref(self, name): def handle_charref(self, name):
import unicodedata self.handle_data(unichr(int(name)))
char = unicodedata.name(unichr(int(name)))
self.handle_data(char)
def handle_entityref(self, name): def handle_entityref(self, name):
import htmlentitydefs import htmlentitydefs
if name in htmlentitydefs.entitydefs: if name in htmlentitydefs.entitydefs:
......
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