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 5886905 commit bcde63aCopy full SHA for bcde63a
shared/src/main/scala/scala/xml/PCData.scala
@@ -26,7 +26,7 @@ class PCData(data: String) extends Atom[String](data) {
26
* @return the input string buffer with the formatted CDATA section
27
*/
28
override def buildString(sb: StringBuilder): StringBuilder =
29
- sb append "<![CDATA[%s]]>".format(data)
+ sb append "<![CDATA[%s]]>".format(data.replaceAll("]]>", "]]]]><![CDATA[>"))
30
}
31
32
/**
0 commit comments