diff --git a/evennia/server/portal/mxp.py b/evennia/server/portal/mxp.py index 0d7efefd34..f1c14f26fc 100644 --- a/evennia/server/portal/mxp.py +++ b/evennia/server/portal/mxp.py @@ -21,7 +21,7 @@ LINKS_SUB = re.compile(r'\|lc(.*?)\|lt(.*?)\|le', re.DOTALL) MXP = "\x5B" MXP_TEMPSECURE = "\x1B[4z" MXP_SEND = MXP_TEMPSECURE + \ - "" + \ + "" + \ "\\2" + \ MXP_TEMPSECURE + \ "" @@ -38,6 +38,7 @@ def mxp_parse(text): """ text = text.replace("&", "&") \ + .replace('"', """) \ .replace("<", "<") \ .replace(">", ">") diff --git a/evennia/utils/text2html.py b/evennia/utils/text2html.py index 066301beba..fd751c5523 100644 --- a/evennia/utils/text2html.py +++ b/evennia/utils/text2html.py @@ -234,7 +234,7 @@ class TextToHTMLparser(object): def convert_links(self, text): """ - Replaces links with HTML code. + Replaces MXP links with HTML code. Args: text (str): Text to process. @@ -243,7 +243,7 @@ class TextToHTMLparser(object): text (str): Processed text. """ - return self.re_mxplink.sub(r"""\2""", text) + return self.re_mxplink.sub(r'''\2''', text) def do_sub(self, match): """