W3C home > Mailing lists > Public > www-validator-cvs@w3.org > June 2010

commit: treats titles as mixed text/html elements

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 10 Jun 2010 14:54:27 -0400
To: Unicorn Updates <www-validator-cvs@w3.org>
Message-Id: <E1OMmtX-0007jP-VN@blinky.w3.org>
changeset:   1178:c145af8efb86
user:        Thomas Gambet <tgambet@w3.org>
date:        Thu Jun 10 11:17:49 2010 -0400
files:       src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java
description:
treats titles as mixed text/html elements


diff -r 430052d51cc1 -r c145af8efb86 src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java
--- a/src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java	Thu Jun 10 11:17:18 2010 -0400
+++ b/src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java	Thu Jun 10 11:17:49 2010 -0400
@@ -33,7 +33,15 @@
 	
 	public DefaultMessageXBeans(MessageType message) {
 		
-		title = message.getTitle();
+		XmlOptions opts = new XmlOptions();
+		opts.setSaveCDataLengthThreshold(10000000);
+		opts.setSaveCDataEntityCountThreshold(-1);
+		opts.setUseDefaultNamespace();
+		
+		title = message.getTitle().xmlText(opts)
+				.replaceAll("[ ]*xmlns=\"[^>]*\"", "").replaceAll("</?xml-fragment[^>]*>", "");
+
+		//title = message.getTitle();
 		
 		lang = message.getLang();
 		
@@ -54,10 +62,6 @@
 			group = message.getGroup();
 		
 		if (message.isSetDescription()) {
-			XmlOptions opts = new XmlOptions();
-			opts.setSaveCDataLengthThreshold(10000000);
-			opts.setSaveCDataEntityCountThreshold(-1);
-			opts.setUseDefaultNamespace();
 			description = message.getDescription().xmlText(opts)
 				.replaceAll("[ ]*xmlns=\"[^>]*\"", "").replaceAll("</?xml-fragment[^>]*>", "");
 		}
Received on Thursday, 10 June 2010 18:56:48 GMT

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