pjfanning opened a new pull request, #1459:
URL: https://github.com/apache/poi/pull/1459

   Follow-up to #1455, addressing the review comments there.
   
   - `WordToHtmlConverter.setHyperlinkValidator(Predicate<String>)` (and 
getter) lets users add their own check on HYPERLINK field targets, e.g. to only 
link to some hosts. A rejected target keeps its text but is not written as a 
link.
   - The validator only applies to standard URLs: 
`WordToHtmlUtils.isSafeHyperlink` always runs first, so a custom validator can 
reject more targets but can never let a `javascript:` (or other script) target 
through. The default validator accepts everything that passes the built-in 
check, so output is unchanged.
   - `WordToHtmlUtils.isSafeHyperlink` is now public so callers can reuse it.
   - `testIsSafeHyperlink` now uses Hamcrest, so a failure lists every target 
that was classified wrongly instead of a bare `expected: <true>`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to