Repository navigation
Conversation
The next/previous links on a permalink page and the titles in the big calendar now go through a new Utilities.plainTextExcerpt: markup removed, entities decoded, cut at a word boundary, then HTML-encoded. Titles saved with entities are no longer encoded twice.
mraible
approved these changes
Nov 15, 2026
mraible
left a comment
Contributor
There was a problem hiding this comment.
LGTM. plainTextExcerpt decodes and cuts the text before encoding it, so a cut can't land inside an entity and markup can't reach the page. Null and blank titles are handled. No other pager or calendar code prints raw titles. Trivial nit: the new Utilities import in BigWeblogCalendarModel sits between two pojos imports.
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 next/previous links on a permalink page and the big calendar (
#showWeblogEntryCalendarBig) printed entry titles from the POJO, not the wrapper, and handled markup and entities inconsistently.Utilities.plainTextExcerpt: remove markup, decode entities, cut at a word boundary, then HTML-encode. The pager (15–20 characters) and the calendar (20) use it.&no longer becomes&, and markup in a title no longer reaches the page as markup.Tests:
UtilitiesTest.testPlainTextExcerpt, andWeblogEntriesPermalinkPagerTitleTest, which builds real entries and checks the next/previous names. The pager test fails onroller-6.1.xand passes here.mvn -pl app test: 500 tests, 0 failures. No test covers the calendar change; it uses the same helper, but a look at an archive page with the big calendar would confirm it.Once this is merged, the same change goes to master for 7.0.0.