summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-09-22 17:38:58 -0500
committerJeff Epler <jepler@gmail.com>2020-09-22 17:39:44 -0500
commit28e80e47d708fe346be0ae8d430f1a86d5d3049b (patch)
tree7445e115b92832d76bd943d61d18637c9e42f563
parentdf067b498d05ed2acd20ba39b7e4f97ebe4fae6a (diff)
makeqstrdefs: don't make _and_, _or_ poisoned substrings for QSTRs
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.
-rw-r--r--py/makeqstrdefs.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py
index cb27ced35..d3e90ba48 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 [("/", "__"), ("\\", "__"), (":", "@"), ("..", "@@")]: