GLM-5.3 Flash · Balanced
add-html-sanitizer-for-translated-message-resources-keycloak
Keycloak · Java · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Opus 5.5.
- Gold bugs found
- 2 of 7
- Comments published
- 4
- Comments matching a bug
- 2
- Comments not matching
- 2
- Cost of this PR
- $0.150
Published comments (4)
Revert message to i18next interpolation syntax broken for account console — i18next in `setUserProfileServerError` cannot substitute `{0}` or evaluate `{2,choice,...}`, so English users see the raw pattern instead of attribute names and counts. Restore `{{0}}`-style placeholders as community translations keep them; choice pluralization only works in server-rendered MessageFormat themes.
Java MessageFormat syntax rendered literally in admin console message — English admins see the raw MessageFormat syntax instead of attribute names and counts because the admin console interpolates this key via i18next in `setUserProfileServerError`. Restore `{{0}}`-style placeholders; the `{2,choice,...}` pluralization only works in server-rendered themes.
`santizeAnchors` pairs anchor tags by order, rejecting reordered translations — A valid translation that reorders anchor tags fails the build with `Didn't find anchor tag` because `englishMatcher.find()` only advances on exact positional matches, and `replaceFirst()` also strips the first occurrence rather than the matched one. Collect the tags into sets and compare membership and counts instead.
Lithuanian totpStep1 contains Italian text instead of Lithuanian — Lithuanian users see Italian on the OTP setup page; the same Italian also replaced `loginTotpStep1` in the login theme's messages_lt.properties. Replace both with a Lithuanian rendering of the new English wording; anchors are no longer needed since the source dropped them. **Also found in:** - `themes/src/main/resources-community/theme/base/login/messages/messages_lt.properties:71-71`