mirror of https://github.com/dirtbags/netarch.git
more robust escaping/encoding
This commit is contained in:
parent
3e1dfcba49
commit
06a964a3a1
|
@ -808,7 +808,7 @@ class HtmlSession(Session):
|
||||||
|
|
||||||
def log(self, frame, payload, escape=True):
|
def log(self, frame, payload, escape=True):
|
||||||
if escape:
|
if escape:
|
||||||
p = cgi.escape(unicode(payload))
|
p = cgi.escape(payload).encode('ascii', 'xmlcharrefreplace')
|
||||||
else:
|
else:
|
||||||
p = payload
|
p = payload
|
||||||
if frame.saddr == self.srv:
|
if frame.saddr == self.srv:
|
||||||
|
|
Loading…
Reference in New Issue