text2html.py Use double quotes in HTML MXP link

This just changes the problem from not escaping single quotes properly to not escaping double quotes when supplied in the MXP command or text.
This commit is contained in:
BlauFeuer 2016-10-26 15:12:41 -04:00 committed by GitHub
parent ecb82a2a23
commit 501c9f73a1

View file

@ -243,7 +243,7 @@ class TextToHTMLparser(object):
text (str): Processed text.
"""
return self.re_mxplink.sub(r"""<a id='mxplink' href='#' onclick='Evennia.msg("text",["\1"],{}); return false;'>\2</a>""", text)
return self.re_mxplink.sub(r'''<a id="mxplink" href="#" onclick="Evennia.msg(&quot;text&quot;,[&quot;\1&quot;],{}); return false;">\2</a>''', text)
def do_sub(self, match):
"""