Repository navigation
Keep blogroll links to web and relative URLs - #221
Conversation
OPML import keeps only absolute http and https links. Templates get bookmark URLs through the wrapper only when they are relative or use http, https, ftp or mailto, so links stored earlier are covered too. The blogroll macro escapes the URLs it prints in attributes.
|
🤖 GLM: PR-Review — General Issues The following issues were found but cannot be attached to a specific line in the diff:
Strengths worth noting (not action items): the two-layer approach (import-time validation plus the wrapper's scheme allow-list for stored values) covers data written before this change, and |
|
🤖Claude: fixed by adding a CHANGES.md entry under 6.1.7 behaviour changes (cb1ec31). |
mraible
left a comment
There was a problem hiding this comment.
I checked the import, display and manual-entry paths. Manual entry is already limited to http(s)/ftp by the Struts url validator, and the template now escapes the hrefs. LGTM, with one optional note inline.
snoopdave
left a comment
There was a problem hiding this comment.
Good direction. Some improvements inline. One more: a Velocity test that renders #showBookmarkLinksList with a bookmark whose URL contains " and whose name contains <b> would cover the macro escaping end to end; today only the wrapper and import are tested.
Import and display now share LinkScheme, which reads a link's scheme the way a browser does and refuses a link with '&' before the path. Import no longer drops links that java.net.URI rejects but browsers accept. The blogroll macro escapes bookmark names and descriptions, and a duplicate #if branch is gone.
|
🤖Claude: not fixed — the macro rendering test from the review summary. Rendering |
…-urls # Conflicts: # CHANGES.md
Blogroll links are kept to web and relative URLs:
httporhttpsURLs.WeblogBookmarkWrapperonly when they are relative or usehttp,https,ftpormailto, so links stored by earlier imports are covered too.weblog.vmescapes the URLs it prints in attributes.Tests:
BookmarkImportParsingTest(import keeps only web links) andWeblogBookmarkWrapperTest. Full build and tests pass on JDK 11.