When XSLT output method is html, characters supported by the target encoding 
were serialized as HTML entity references (for example, é as eacute;). This 
caused failures when the generated output was later processed as XML.

**Solution:**
Update HTML serializer to write characters directly when they are supported by 
the configured encoding, and retain existing entity escaping behavior for 
unsupported characters.

**Testing:**
Verified XSLT transformation with accented characters and confirmed generated 
output can be parsed successfully without XML parsing failures.

Performed Tier1 and Tier2 tests in Linux with and without the fix. No 
regression found


The bug report for the same: https://bugs.openjdk.org/browse/JDK-8387291

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8387291: XSLT transformation fails on accented characters when output is set 
to HTML instead of XML- #31689

Changes: https://git.openjdk.org/jdk/pull/31689/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31689&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8387291
  Stats: 6 lines in 1 file changed: 5 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/31689.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31689/head:pull/31689

PR: https://git.openjdk.org/jdk/pull/31689

Reply via email to