Skip to content

Commit

Permalink
Removed CDATA tags from html output
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Jul 5, 2024
1 parent 3f6eae7 commit e29b270
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/main/java/dev/webfx/cli/util/xml/XmlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ public static String formatHtmlText(Node node) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
XMLWriter writer = new XMLWriter(baos, HTML_FORMAT) {

@Override
protected void writeNodeText(Node node) throws IOException {
super.writeNodeText(node);
protected void writeCDATA(String text) throws IOException { // We remove the CDATA tag when exporting to html
//writer.write("<![CDATA[");
if (text != null) {
writer.write(text);
}
//writer.write("]]>");
lastOutputNodeType = Node.CDATA_SECTION_NODE;
}

};
writer.write(node);
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/dev/webfx/cli/version/dev/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.1.0-SNAPSHOT
build.timestamp=2024-07-04 11:49
build.timestamp=2024-07-05 11:18

0 comments on commit e29b270

Please sign in to comment.