HTML5 Filter (okf_itshtml5) adds/removes HTML declaration header and inserts/moves BOM

Issue #1310 open
Kuro Kurosaka (BH Lab) created an issue

The HTML5 filter inserts an HTML declaration (<!DOCTYPE html>) when one doesn't exist but removes an existing HTML declaration.

It also insert a BOM when one doesn’t exists but when one exists, it is moved to somewhere in the middle of the document.

See https://groups.google.com/g/okapi-devel/c/cMimEskhA6o

Comments (7)

  1. jhargrave-straker

    @Kuro Kurosaka curious if your tests pass now. I did add the unit test you posted. Note there are still issues with the filter - mostly with escaping. But hopefully works in most cases.

  2. Kuro Kurosaka (BH Lab) reporter

    @Jim Hargrave , thank you. I confirm that the test passes now.

    I have one favor to ask you. Please move the test case to integration-tests/okapi/src/test/java/net/sf/okapi/common/pipeline/integration/MultistepPipelineTestIT.java and remove the new MultistepPipelineTestIT.java. And replace “jsp” to “html”. The confusing names are there for a historical reason.

  3. Kuro Kurosaka (BH Lab) reporter

    If I remove the BOM from the test string, however, the test fails because the filter inserts the BOM. Is this by design?

  4. Log in to comment