mraible opened a new pull request, #298:
URL: https://github.com/apache/roller/pull/298

   `<s:property>` escapes HTML special characters except the apostrophe, so its 
output belongs in element content or double-quoted attributes. This makes the 
UI JSPs follow that consistently:
   
   - Values in single-quoted attributes now use double quotes (27 attributes).
   - Values inside `<script>` blocks are JavaScript-escaped instead of 
HTML-escaped. The two scripts that build HTML strings use both, with escaped 
double quotes around their attributes.
   - Values used by inline event handlers travel in `data-*` attributes and are 
read with `this.dataset`, as `AuthoringUiSinkAuditTest` already expects.
   
   `UIAction` already HTML-escapes string arguments in its `getText` methods, 
but `<s:text>` calls the two overloads that take a `ValueStack`, which it 
didn't override. It now does, so `<s:param>` values are escaped everywhere. 
Comments.jsp's `<s:param>` values that were already wrapped in `<s:property>` 
go back to plain `<s:param value>` so they aren't escaped twice.
   
   - New `JspOutputEncodingTest` checks every JSP: no `<s:property>` in a 
single-quoted attribute, every `<s:property>` in a script is 
JavaScript-escaped, and `escapeHtml="false"` is used only on pages listed in 
the test.
   - `UIActionTest` checks that `<s:text>` arguments are escaped through the 
`ValueStack` overloads while the message's own markup is kept.
   - `mvn install` passes on JDK 21 (735 tests, 1 skipped). I haven't run the 
Playwright UI tests locally.
   
   The same change for roller-6.1.x is in #OTHER.
   


-- 
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]

Reply via email to