Skip to content

Potential fix for code scanning alert no. 1: Bad HTML filtering regexp#36

Merged
jmaxdev merged 1 commit intomainfrom
alert-autofix-1
Apr 19, 2026
Merged

Potential fix for code scanning alert no. 1: Bad HTML filtering regexp#36
jmaxdev merged 1 commit intomainfrom
alert-autofix-1

Conversation

@jmaxdev
Copy link
Copy Markdown
Collaborator

@jmaxdev jmaxdev commented Apr 19, 2026

Potential fix for https://github.com/TrixtyAI/ide/security/code-scanning/1

General fix: update the HTML comment end-tag regex to accept both standard and permissive parser-accepted forms.

Best fix here: in apps/desktop/src/addons/builtin.language.html/index.ts, in the comment tokenizer state, replace the terminator regex from -->/ to a pattern that matches both --> and --!>, i.e. /--!?\>/ (or equivalent). This preserves existing behavior while adding the missing valid terminator variant.

Only one code region needs to change:

  • tokenizer.comment rule (currently line 40 in provided snippet).

No new imports, methods, or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@jmaxdev jmaxdev marked this pull request as ready for review April 19, 2026 05:35
@jmaxdev jmaxdev merged commit 83858f9 into main Apr 19, 2026
8 checks passed
@jmaxdev jmaxdev deleted the alert-autofix-1 branch April 19, 2026 05:35
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.

1 participant