From 28e80e47d708fe346be0ae8d430f1a86d5d3049b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Sep 2020 17:38:58 -0500 Subject: [PATCH] makeqstrdefs: don't make _and_, _or_ poisoned substrings for QSTRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New contributor @mdroberts1243 encountered an interesting problem in which the argument they had named "column_underscore_and_page_addressing" simply couldn't be used; I discovered that internally this had been transformed into "column_underscoreāˆ§page_addressing", because QSTR makes _ENTITY_ stand for the same thing as &ENTITY; does in HTML. This might be nice for some things, but we don't want it here! I was unable to find a sensible way to "escape" and prevent this entity coding, so instead I ripped out support for the _and_ and _or_ escapes. --- py/makeqstrdefs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py index cb27ced356..d3e90ba486 100644 --- a/py/makeqstrdefs.py +++ b/py/makeqstrdefs.py @@ -57,6 +57,10 @@ name2codepoint['caret'] = ord('^') name2codepoint['pipe'] = ord('|') name2codepoint['tilde'] = ord('~') +# These are just vexing! +del name2codepoint['and'] +del name2codepoint['or'] + def write_out(fname, output): if output: for m, r in [("/", "__"), ("\\", "__"), (":", "@"), ("..", "@@")]: