EnesKartal opened a new pull request, #1134:
URL: https://github.com/apache/maven-doxia/pull/1134

   Fixes #1127.
   
   `XdocSink` writes the title of a level 1 or level 2 section into the `name` 
attribute of `<section>`/`<subsection>`. Text was escaped, but inline events 
such as `bold()`, `link()`, `inline(CODE)` or `lineBreak()` wrote their tags 
into the attribute, so the output was not well-formed XML.
   
   While such a title is open, `XdocSink` now drops the start and end tags 
written by inline events and keeps only their (escaped) text. Titles of level 3 
to 6 (`<h3>`..`<h6>`) and everything outside a title are unchanged.
   
   ```
   before: <section name="Use <b>mvn</b> &amp; <a 
href="http://example.com/";>more</a>"><subsection name="<code>code</code><br />">
   after:  <section name="Use mvn &amp; more"><subsection name="code">
   ```
   
   ### Test plan
   
   - New `XdocSinkTest.inlineMarkupInSectionTitle` (also inherited by 
`XdocSinkWithLanguageIdTest`): fails on master with the output above, passes 
with the fix.
   - `mvn -pl doxia-modules/doxia-module-xdoc verify`: Tests run: 136, 
Failures: 0, Errors: 0; spotless and checkstyle pass.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


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