Repository navigation
Escape user names, commenter details and tag names where they are output - #330
Merged
Merged
Conversation
UserWrapper now returns screen and full names as HTML-escaped text, encoding them exactly once whether they were stored as typed or already encoded by the sanitizer, and the built-in feed macros turn them back into text before XML-escaping them for Atom author names and RSS dc:creator. HTML comment notification emails escape the commenter's name and email address. WeblogEntryCommentWrapper escapes HTML comments when the HTMLSubset plugin isn't both configured and listed on the comment, and its Javadoc now describes what getContent does. Utilities.transformToHTMLSubset and addNofollow find each link's closing bracket with one forward search and stop when none is left, so their time is linear in the input, and addNofollow now adds rel="nofollow" to links that don't already have it. TagDataServlet writes tag names and the weblog handle with JSON and XML escaping. The planet group pages pass handles and feed URLs to their delete handlers through data attributes, and JspOutputEncodingTest rejects property values inside inline event handlers. CommentDataServlet returns comment content as JSON, which Comments.jsp reads with jQuery's json data type, and UserDataServlet declares its plain text response. WeblogEntryCommentWrapper.getContent now HTML-escapes any comment that isn't text/html with the HTMLSubset plugin applied, including comments without a content type. The ping target page passes ping target ids, names and URLs to its edit and delete handlers through data attributes instead of inline event handlers.
snoopdave
reviewed
Nov 18, 2026
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.
The 6.1.x version of #318. The planet JSPs keep 6.1.x's markup with master's data-* attributes, and PingTargets.jsp, which only 6.1.x has, now passes ping target ids, names and URLs to its handlers through data-* attributes too, since the new JspOutputEncodingTest rule flagged it. jackson-databind 2.22.3 is added at test scope for two tests that parse JSON.
Fourteen of the 41 new and changed test cases fail without the change. mvn test passes (548 run, 1 skipped), and the Selenium integration tests pass.
CHANGES entries for the 6.1.8 fixes will come in one PR.