mraible opened a new pull request, #318: URL: https://github.com/apache/roller/pull/318
Escaping and parsing fixes where names, comments and tags are output: - `UserWrapper` returns screen and full names as HTML-escaped text, encoded exactly once whether they were stored as typed or already encoded by the sanitizer (`weblogAdminsUntrusted`). The built-in feed macros write them as plain text in Atom `<author><name>` and RSS `dc:creator`. - HTML comment notification emails escape the commenter's name and email. - `WeblogEntryCommentWrapper.getContent` HTML-escapes any comment that isn't `text/html` with the HTMLSubset plugin both configured and applied, including comments without a content type. Its Javadoc now says what it does. - `Utilities.transformToHTMLSubset` and `addNofollow` find each link's closing `>` with one forward search, so their time is linear in the input; `addNofollow` now adds `rel="nofollow"` to links that lack it (it used to touch only links that already had it). - `TagDataServlet` JSON- and XML-escapes tag names and the weblog handle. - The planet group pages pass handles and feed URLs to their delete handlers through `data-*` attributes, and `JspOutputEncodingTest` now rejects property values inside inline event handlers. - `CommentDataServlet` GET returns JSON as `application/json`, and `Comments.jsp` reads it with `dataType: "json"` instead of `eval`. `UserDataServlet` sets an explicit content type. Tests: `UserWrapperTest`, `FeedAuthorEscapingTest`, `MailUtilCommentNotificationTest`, `TagDataServletTest`, new cases in `WeblogEntryCommentWrapperTest`, `UtilitiesTest`, `CommentDataServletTest`, `UserDataServletTest` and `JspOutputEncodingTest`; fourteen fail without the change. `mvn test` passes (765 tests), and the Playwright database-login suite passes. CHANGES entries for this and the related fixes will come in one PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
