W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/src/org/w3c/unicorn/util XHTMLize.java,1.4,1.5

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 14 Sep 2009 15:50:17 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MnDon-00082q-5q@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv30801/src/org/w3c/unicorn/util

Modified Files:
	XHTMLize.java 
Log Message:
uses escapeHtml instead of escapeXml

Index: XHTMLize.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/XHTMLize.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- XHTMLize.java	3 Sep 2009 16:43:21 -0000	1.4
+++ XHTMLize.java	14 Sep 2009 15:50:15 -0000	1.5
@@ -46,7 +46,7 @@
 		if (sReference.startsWith("$noEscape_"))
 			return oValue.toString();
 		else
-			return StringEscapeUtils.escapeXml(oValue.toString());
+			return StringEscapeUtils.escapeHtml(oValue.toString());
 	}
 
 	/**
@@ -63,7 +63,7 @@
 			if (oElement instanceof Img) {
 				sResultat += insertImg((Img) oElement);
 			} else {
-				sResultat += StringEscapeUtils.escapeXml(oElement.toString());
+				sResultat += StringEscapeUtils.escapeHtml(oElement.toString());
 			}
 		}
 		sResultat += "</a>";
@@ -85,7 +85,7 @@
 			} else if (oElement instanceof Img) {
 				sResultat += insertImg((Img) oElement);
 			} else {
-				sResultat += StringEscapeUtils.escapeXml(oElement.toString());
+				sResultat += StringEscapeUtils.escapeHtml(oElement.toString());
 			}
 		}
 		sResultat += "</code>";
@@ -100,8 +100,8 @@
 	 * @return the string containing the image tag
 	 */
 	private String insertImg(final Img aImage) {
-		return "<img src=\"" + StringEscapeUtils.escapeXml(aImage.getSrc())
-				+ "\" alt=\"" + StringEscapeUtils.escapeXml(aImage.getAlt())
+		return "<img src=\"" + StringEscapeUtils.escapeHtml(aImage.getSrc())
+				+ "\" alt=\"" + StringEscapeUtils.escapeHtml(aImage.getAlt())
 				+ "\"/>";
 	}
 
Received on Monday, 14 September 2009 15:50:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:14 GMT