Skip to content

Fix angle bracket handling#304

Merged
danmactough merged 2 commits into
mainfrom
angle-brackets
May 14, 2026
Merged

Fix angle bracket handling#304
danmactough merged 2 commits into
mainfrom
angle-brackets

Conversation

@danmactough
Copy link
Copy Markdown
Owner

Resolves #165

Values for meta.title, meta.description and item.title should be stripped of HTML tags, but not angle brackets that aren't HTML tags. So, <span>lemon</span> should become "lemon", and <<<Nonsense>>> should remain as-is.

This replaces the very naive and incorrect stripHtml helper with a stateful parser to strip HTML tags, HTML comments and declarations, and XML processing instructions without stripping all angle brackets. It was clearly not well thought-out before, but this was the behavior we expected stripHtml.

@danmactough danmactough merged commit 14cff52 into main May 14, 2026
5 checks passed
@danmactough danmactough deleted the angle-brackets branch May 14, 2026 21:20
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.

an angled bracket in title

1 participant