mirror of
https://github.com/golang/go
synced 2024-11-13 17:00:22 -07:00
fix handling of escaped characters like ' " & < >
R=r http://go/go-review/1013007
This commit is contained in:
parent
79a63728eb
commit
eea2573032
@ -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):
|
|||||||
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user