thswlsqls opened a new issue, #8551:
URL: https://github.com/apache/paimon/issues/8551

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ a8e4069b9
   
   **Compute Engine**
   Engine-agnostic (docs generation, paimon-docs)
   
   **Minimal reproduce step**
   `Utils.escapeCharacters()` 
(paimon-docs/src/main/java/org/apache/paimon/docs/util/Utils.java line 30) 
escapes `<` and `>` but not `&`. It renders the Key/Default/Type/enum columns 
of the generated config tables (ConfigOptionsDocGenerator lines 
386/389/435/468/472). The sibling `HtmlFormatter.escapeCharacters()` 
(paimon-api/src/main/java/org/apache/paimon/options/description/HtmlFormatter.java
 line 69), which renders the Description column of the same table, escapes `&`, 
`<`, `>`.
   
   **What doesn't meet your expectations?**
   A `&` in a config option key or default value is left unescaped in the 
generated HTML, while the same `&` is escaped in the Description column. This 
is inconsistent within one table and produces invalid HTML for those columns.
   
   **Anything else?**
   Fix: escape `&` first (before `<`/`>`) in `Utils.escapeCharacters`, matching 
`HtmlFormatter`. Ordering matters so the `&` in the produced `&lt;`/`&gt;` is 
not double-escaped.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   
   


-- 
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