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

2006/unicorn/src/org/w3c/unicorn/util XHTMLize.java,1.1.2.1,1.1.2.2

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 28 Aug 2009 10:05:00 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MgyKK-0002nz-BI@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv10730/src/org/w3c/unicorn/util

Modified Files:
      Tag: dev2
	XHTMLize.java 
Log Message:
does not escape the page title twice
any reference prefixed with $noEscape_ won't be escape by XHTMLize()

Index: XHTMLize.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Attic/XHTMLize.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- XHTMLize.java	27 Aug 2009 12:13:55 -0000	1.1.2.1
+++ XHTMLize.java	28 Aug 2009 10:04:58 -0000	1.1.2.2
@@ -2,6 +2,7 @@
 
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.velocity.app.event.ReferenceInsertionEventHandler;
+import org.w3c.unicorn.Framework;
 import org.w3c.unicorn.response.A;
 import org.w3c.unicorn.response.Code;
 import org.w3c.unicorn.response.Img;
@@ -43,7 +44,10 @@
 			Code code = (Code) oValue;
 			return insertCode(code);
 		}
-		return StringEscapeUtils.escapeHtml(oValue.toString());
+		if (sUnused.startsWith("$noEscape_"))
+			return oValue.toString();
+		else
+			return StringEscapeUtils.escapeHtml(oValue.toString());
 	}
 
 	/**
Received on Friday, 28 August 2009 10:05:08 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:38 UTC