mrdevel2002-ui opened a new pull request, #3400: URL: https://github.com/apache/tika/pull/3400
TikaGUI shows the parser's XHTML in a Swing `text/html` pane, and DefaultHtmlMapper keeps `<object classid>`, `<param>`, `<link>` and any `<img src>` from HTML input. Swing's ObjectView loads the class named by `classid`, constructs it if it is a `java.awt.Component` and calls its String setters with the `<param>` values, and the view also fetches `<link>` stylesheets and remote image sources as soon as the text is set, so opening a document in the GUI constructs and configures whatever no-arg Component on the tika-app classpath the document names and sends requests to hosts the document chooses. `getHtmlHandler` now drops those elements and keeps an image source only when it is the `embedded:` reference it already rewrites to a local temp file; the img attributes are copied instead of edited in place, so the XHTML card still shows the parser's own output. Verified by opening a crafted HTML file through `TikaGUI.openFile` against a local HTTP listener: on main a marker Component named by the document is instantiated with the document's `<param>` value and the image and stylesheet URLs are requested, and with this change neither happens while `embedded:` images still display. tika-app has no GUI test harness (TikaGUI is a JFrame, which cannot be created headless in CI), so no test is added; `./mvnw clean install -pl tika-app` is green. There is no JIRA issue for this yet; I will open one and add the TIKA-XXXX prefix to the title and commit before this is merged. -- 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]
