We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06a7758 commit f52a682Copy full SHA for f52a682
shared/src/main/scala/scala/xml/PCData.scala
@@ -27,7 +27,7 @@ class PCData(data: String) extends Atom[String](data) {
27
* @return the input string buffer with the formatted CDATA section
28
*/
29
override def buildString(sb: StringBuilder): StringBuilder =
30
- sb append "<![CDATA[%s]]>".format(data)
+ sb append "<![CDATA[%s]]>".format(data.replaceAll("]]>", "]]]]><![CDATA[>"))
31
}
32
33
/**
0 commit comments