Skip to content

regex XML_COMMENT is buggy, and xml comments are ignored by parser anyway - #656

Merged
NSoiffer merged 5 commits into
daisy:mainfrom
moritz-gross:simplify-xml-parsing
Aug 12, 2026
Merged

regex XML_COMMENT is buggy, and xml comments are ignored by parser anyway#656
NSoiffer merged 5 commits into
daisy:mainfrom
moritz-gross:simplify-xml-parsing

Conversation

@moritz-gross

Copy link
Copy Markdown
Collaborator

I was chatting with Codex about the codebase, and found this.
As far as I can tell, the Regex XML_COMMENT does not work, as it is only an inline modifier inside of a raw Rust string, and additionally removing comments is not needed anyway as we use a parser that ignores it afterwards.

@NSoiffer what do you say?

@moritz-gross
moritz-gross requested a review from NSoiffer August 6, 2026 23:51
@moritz-gross moritz-gross changed the title regex is buggy, and xml comments are ignored by parser anyway regex XML_COMMENT is buggy, and xml comments are ignored by parser anyway Aug 8, 2026
@moritz-gross moritz-gross added the rust Coding in Rust label Aug 9, 2026
moritz-gross and others added 4 commits August 11, 2026 02:48
Removed the static regex for processing instructions and comments. `sxd_parser` handles these and the earlier size limit prevents DOS attacks. All but elements and text children are eliminated from the DOM in `cleanup_mathml`.
Fix the usage of mathml_str in HTML_ENTITIES replacement.
@NSoiffer
NSoiffer merged commit 42ec87e into daisy:main Aug 12, 2026
7 of 8 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in MathCAT Project Board Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Coding in Rust

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants