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

2002/css-validator/org/w3c/css/css CssRuleList.java,1.18,1.19 CssStyleRule.java,1.17,1.18

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 25 Feb 2009 20:44:51 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1LcQcd-0000sK-RV@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/css
In directory hutz:/tmp/cvs-serv3171/org/w3c/css/css

Modified Files:
	CssRuleList.java CssStyleRule.java 
Log Message:
Fixes http://www.w3.org/Bugs/Public/show_bug.cgi?id=5770
Added accessors to get X/HTML escaped versions of differents String
(like URL representation, selectors, warning messages, etc).
The markup-based output were modified accordingly.



Index: CssStyleRule.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssStyleRule.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- CssStyleRule.java	24 Feb 2009 21:45:14 -0000	1.17
+++ CssStyleRule.java	25 Feb 2009 20:44:49 -0000	1.18
@@ -8,6 +8,7 @@
 import java.util.Vector;
 
 import org.w3c.css.properties.css1.CssProperty;
+import org.w3c.css.util.Messages;
 
 public class CssStyleRule {
 
@@ -25,7 +26,11 @@
     public String getSelectors() {
 	return selectors;
     }
-	
+    
+    public String getSelectorsEscaped() {
+	return Messages.escapeString(selectors);
+    }
+
     /**
      * This function is only used inside the velocity template
      * @return the list of properties in a Vector
@@ -65,6 +70,10 @@
 	return ret.toString();
     }
 
+    public String toStringEscaped() {
+	return Messages.escapeString(toString());
+    }
+
     /*
      * public String toHTML() { StringBuffer ret = new StringBuffer("<li><span
      * class='selector'>"); if (selectors != null) { ret.append(selectors);

Index: CssRuleList.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssRuleList.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- CssRuleList.java	24 Feb 2009 21:45:14 -0000	1.18
+++ CssRuleList.java	25 Feb 2009 20:44:49 -0000	1.19
@@ -8,6 +8,7 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.AtRule;
+import org.w3c.css.util.Messages;
 
 public class CssRuleList {
 
@@ -40,6 +41,10 @@
     public String getAtRule() {
 	return atRuleString;
     }
+    
+    public String getAtRuleEscaped() {
+	return Messages.escapeString(atRuleString);
+    }
 	
     public boolean isEmpty() {
 	return rulelist.isEmpty();
Received on Wednesday, 25 February 2009 20:45:06 GMT

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