Skip to content

When saving template arguments to self.cookies transform MAGIC_*BRACK… - #438

Merged
kristian-clausal merged 1 commit into
mainfrom
magic_char_leaks
Oct 19, 2026
Merged

kristian-clausal merged 1 commit into
mainfrom
magic_char_leaks

Conversation

@kristian-clausal

@kristian-clausal kristian-clausal commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

…ET_CHAR

Fixes tatuylonen/wiktextract#1725

MAGIC_*BRACKET_CHAR are two magical characters used in a kludge for pairs of square brackets ([]) that are annoying to parse, but this was one point where I
hadn't realize we need to transform them back; template arguments would have leaked magical characters, and because they could contain other, even nested magical characters, this was difficult to notice, and square brackets are rare in text in wikitext anyhow.

…ET_CHAR

MAGIC_*BRACKET_CHAR are two magical characters used in
a kludge for pairs of square brackets (`[]`) that are
annoying to parse, but this was one point where I
hadn't realize we need to transform them back; template
arguments would have leaked magical characters, and because
they could contain other, even nested magical characters,
this was difficult to notice, and square brackets are
rare in text in wikitext anyhow.
@kristian-clausal
kristian-clausal merged commit 6f96ddf into main Oct 19, 2026
12 checks passed
@kristian-clausal
kristian-clausal deleted the magic_char_leaks branch October 19, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some escape chars may be leaking into extraction outputs

1 participant