Skip to content

Filter HTML-significant characters out of tag names - #208

Merged
snoopdave merged 2 commits into
roller-6.1.xfrom
atompub-tag-normalization
Oct 9, 2026
Merged

snoopdave merged 2 commits into
roller-6.1.xfrom
atompub-tag-normalization

Conversation

@snoopdave

@snoopdave snoopdave commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Tag names now exclude ", &, ', <, > and `. The filter is in Utilities.stripInvalidTagCharacters, which every tag path uses (editor, AtomPub, XML-RPC, media files), so templates can print tag names as they are. No theme changes are needed.

Tag names stored earlier are filtered when they are read: WeblogEntryTagWrapper.getName(), WeblogEntryWrapper.getTagsAsString() and the TagStat lists behind the tag clouds.

Ordinary tags such as c++, .net, c#, foo-bar and non-ASCII letters are unchanged.

  • TagCharactersTest: the filter.
  • WeblogEntryTagWrapperTest: tags set on an entry, and tags stored earlier, reach templates filtered.
  • CHANGES.md: behaviour-change note.

The first commit took a different approach (AtomPub-only normalization plus escaping in bundled themes). The second commit reverts it in favour of the shared filter, so the net diff touches no themes.

Full build and tests pass on JDK 11.

AtomPub categories with no scheme become entry tags. Apply the same
normalization the weblog editor uses, so both paths store the same tags.

Bundled themes and the showEntryTags macro now HTML-escape tag names
where they print them as link text.
@snoopdave snoopdave added the 6.1.x label Oct 9, 2026
Tag names now exclude " & ' < > ` in Utilities.stripInvalidTagCharacters,
which every tag path uses. The entry and tag wrappers and the tag
statistics apply the same filter when they read stored names, so names
stored earlier are covered too. Templates can print tag names as they are.

This replaces the earlier AtomPub-only normalization and the theme edits.
@snoopdave snoopdave changed the title Normalize AtomPub tags like editor tags; escape tag names in themes Filter HTML-significant characters out of tag names Oct 9, 2026
@snoopdave
snoopdave merged commit 3dc3cc9 into roller-6.1.x Oct 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant