Skip to content

Preserve literal ampersands during LaTeX decoding - #638

Open
Aschenbath wants to merge 1 commit into
sciunto-org:mainfrom
Aschenbath:fix/637-preserve-literal-ampersands
Open

Aschenbath wants to merge 1 commit into
sciunto-org:mainfrom
Aschenbath:fix/637-preserve-literal-ampersands

Conversation

@Aschenbath

Copy link
Copy Markdown

LatexDecodingMiddleware() currently turns Cats & Dogs into Cats Dogs, losing characters in imported bibliographic fields and URL query strings. Preserve literal ampersands in the built-in decoder's existing LaTeX context. Caller-supplied decoders keep their own rules.

Fixes #637.

Tests cover literal and escaped ampersands, macros, math, URLs, quoted/braced fields and string definitions, parse/encode/decode round trips, and custom-decoder isolation. Eight regressions fail on the original implementation.

Validation: 2,830 tests passed, 12 skipped; all repository pre-commit hooks passed; Sphinx HTML documentation built successfully.

Prepared with Codex.

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.

LatexDecodingMiddleware replaces an unescaped & with whitespace

1 participant