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

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 UTC