Remove special chars from xml output#28
Conversation
|
related to: apache/maven-invoker-plugin#242 |
src/test/java/org/codehaus/plexus/util/xml/Xpp3DomWriterTest.java
Outdated
Show resolved
Hide resolved
|
Looking at the code as a whole I absolutely do not understand why the framework allows to produce invalid (unescaped) XML. It simply does not make sense to me. |
|
@slawekjaranowski I have pushed a naive solution to the problem. @elharo WDYT? |
|
Next commit with removing special chars - fix build in invoker |
|
Can 4.x be used with Maven 3.x? |
Generally no - I will cherry pick to 3.x |
elharo
left a comment
There was a problem hiding this comment.
I'm not very familiar with this API or code base, but at first glance it seems OK. I would add documentation in the appropriate spots indicating that C0 controls are omitted from output.
src/test/java/org/codehaus/plexus/util/xml/pull/MXSerializerTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/plexus/util/xml/PrettyPrintXMLWriter.java
Outdated
Show resolved
Hide resolved
| text = escapeXml(text); | ||
|
|
||
| Matcher m = lowersText.matcher(text); | ||
| StringBuffer b = new StringBuffer(); |
There was a problem hiding this comment.
appendReplacement require StringBuffer, StringBuilder is supported from JDK 9
elharo
left a comment
There was a problem hiding this comment.
It occurs to me that there are also some issues in this class with unpaired surrogates, but one piece of technical arcana at a time. :-)
No description provided.