Use String.replaceAll rather than StringUtils, since some versions of Xalan (as patched by Oracle) try to load the class while compiling the stylesheet. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1453414 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,3 +1,12 @@ | |||||
| Changes from Ant 1.9.0 TO current | |||||
| =================================== | |||||
| Fixed bugs: | |||||
| ----------- | |||||
| * Corrected XSLTC error in <junitreport>. | |||||
| Bugzilla Report 54641. | |||||
| Changes from Ant 1.8.4 TO Ant 1.9.0 | Changes from Ant 1.8.4 TO Ant 1.9.0 | ||||
| =================================== | =================================== | ||||
| @@ -2,7 +2,7 @@ | |||||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | ||||
| xmlns:lxslt="http://xml.apache.org/xslt" | xmlns:lxslt="http://xml.apache.org/xslt" | ||||
| xmlns:redirect="org.apache.xalan.lib.Redirect" | xmlns:redirect="org.apache.xalan.lib.Redirect" | ||||
| xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils" | |||||
| xmlns:string="xalan://java.lang.String" | |||||
| extension-element-prefixes="redirect"> | extension-element-prefixes="redirect"> | ||||
| <xsl:output method="html" indent="yes" encoding="UTF-8"/> | <xsl:output method="html" indent="yes" encoding="UTF-8"/> | ||||
| <xsl:decimal-format decimal-separator="." grouping-separator=","/> | <xsl:decimal-format decimal-separator="." grouping-separator=","/> | ||||
| @@ -705,10 +705,10 @@ h6 { | |||||
| <xsl:template name="JS-escape"> | <xsl:template name="JS-escape"> | ||||
| <xsl:param name="string"/> | <xsl:param name="string"/> | ||||
| <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/> | |||||
| <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/> | |||||
| <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> | |||||
| <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> | |||||
| <xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/> | |||||
| <xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),"'","\\'")"/> | |||||
| <xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2))," ",'\\n')"/> | |||||
| <xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3))," ",'\\r')"/> | |||||
| <xsl:value-of select="$tmp4"/> | <xsl:value-of select="$tmp4"/> | ||||
| </xsl:template> | </xsl:template> | ||||
| @@ -2,7 +2,7 @@ | |||||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | ||||
| xmlns:lxslt="http://xml.apache.org/xslt" | xmlns:lxslt="http://xml.apache.org/xslt" | ||||
| xmlns:redirect="http://xml.apache.org/xalan/redirect" | xmlns:redirect="http://xml.apache.org/xalan/redirect" | ||||
| xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils" | |||||
| xmlns:string="xalan://java.lang.String" | |||||
| extension-element-prefixes="redirect"> | extension-element-prefixes="redirect"> | ||||
| <xsl:output method="html" indent="yes" encoding="UTF-8"/> | <xsl:output method="html" indent="yes" encoding="UTF-8"/> | ||||
| <xsl:decimal-format decimal-separator="." grouping-separator=","/> | <xsl:decimal-format decimal-separator="." grouping-separator=","/> | ||||
| @@ -864,10 +864,10 @@ h6 { | |||||
| <xsl:template name="JS-escape"> | <xsl:template name="JS-escape"> | ||||
| <xsl:param name="string"/> | <xsl:param name="string"/> | ||||
| <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/> | |||||
| <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/> | |||||
| <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> | |||||
| <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> | |||||
| <xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/> | |||||
| <xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),"'","\\'")"/> | |||||
| <xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2))," ",'\\n')"/> | |||||
| <xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3))," ",'\\r')"/> | |||||
| <xsl:value-of select="$tmp4"/> | <xsl:value-of select="$tmp4"/> | ||||
| </xsl:template> | </xsl:template> | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?xml version="1.0"?> | <?xml version="1.0"?> | ||||
| <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" | ||||
| xmlns:lxslt="http://xml.apache.org/xslt" | xmlns:lxslt="http://xml.apache.org/xslt" | ||||
| xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"> | |||||
| xmlns:string="xalan://java.lang.String"> | |||||
| <xsl:output method="html" indent="yes" encoding="UTF-8" | <xsl:output method="html" indent="yes" encoding="UTF-8" | ||||
| doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" /> | doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" /> | ||||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | <xsl:decimal-format decimal-separator="." grouping-separator="," /> | ||||
| @@ -439,10 +439,10 @@ | |||||
| <xsl:template name="JS-escape"> | <xsl:template name="JS-escape"> | ||||
| <xsl:param name="string"/> | <xsl:param name="string"/> | ||||
| <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/> | |||||
| <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),"'","\'")"/> | |||||
| <xsl:param name="tmp3" select="stringutils:replace(string($tmp2)," ",'\n')"/> | |||||
| <xsl:param name="tmp4" select="stringutils:replace(string($tmp3)," ",'\r')"/> | |||||
| <xsl:param name="tmp1" select="string:replaceAll(string:new(string($string)),'\\','\\\\')"/> | |||||
| <xsl:param name="tmp2" select="string:replaceAll(string:new(string($tmp1)),"'","\\'")"/> | |||||
| <xsl:param name="tmp3" select="string:replaceAll(string:new(string($tmp2))," ",'\\n')"/> | |||||
| <xsl:param name="tmp4" select="string:replaceAll(string:new(string($tmp3))," ",'\\r')"/> | |||||
| <xsl:value-of select="$tmp4"/> | <xsl:value-of select="$tmp4"/> | ||||
| </xsl:template> | </xsl:template> | ||||