davsclaus opened a new pull request, #30752:
URL: https://github.com/apache/camel/pull/30752

   _Claude Code on behalf of Claus Ibsen_
   
   Test-only change for camel-tika, following up on 
[CAMEL-27304](https://issues.apache.org/jira/browse/CAMEL-27304) (#30506 
(camel-tika: html output for a document without a title)).
   
   [CAMEL-27201](https://issues.apache.org/jira/browse/CAMEL-27201) reported 
that `tikaParseOutputFormat=html` and `xml` fail on a NUL character in the 
document title (seen with PDFs made by macOS `cupsfilter`). It is a duplicate 
of CAMEL-27304:
   
   - Those PDFs have no title. The NUL came from `ExpandedTitleContentHandler`, 
which writes one into an empty title and expects the serializer to throw. That 
is what CAMEL-27304 fixed.
   - Checked with a `cupsfilter` PDF and the Tika PDF module: before 
CAMEL-27304, `html` failed with the reported `SAXException (Unicode: 0x0)` and 
`xml` worked. On main, both work.
   - A NUL that is really in the title does not fail either: Tika's 
`XHTMLContentHandler` extends `SafeContentHandler`, which replaces it with 
U+FFFD.
   
   This PR adds tests that a NUL in the title comes out as U+FFFD in both 
`html` and `xml` output. No production code changes.
   
   🤖 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]

Reply via email to