Repository navigation
Filter HTML-significant characters out of tag names - #208
Merged
Merged
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tag names now exclude
",&,',<,>and`. The filter is inUtilities.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 theTagStatlists behind the tag clouds.Ordinary tags such as
c++,.net,c#,foo-barand 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.