pjfanning opened a new pull request, #1464: URL: https://github.com/apache/poi/pull/1464
Follow-up to #1459: the same hyperlink validator for the XSL-FO (PDF) converter. - `WordToFoConverter.setHyperlinkValidator(Predicate<String>)` (and getter, `@since 6.0.1`) 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 isn't written as an `fo:basic-link external-destination`. - As in `WordToHtmlConverter`, `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 accepts everything that passes the built-in check, so output is unchanged. - The `isSafeHyperlink` Javadoc now mentions both converters. - `TestWordToFoConverter.testCustomHyperlinkValidator` mirrors the HTML converter test. 🤖 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]
