1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / wizards / html / HTMLUtilities.java
index 945bbcf..8f9db38 100644 (file)
@@ -1,37 +1,29 @@
 /*
- * $Id: HTMLUtilities.java,v 1.1 2004-10-05 20:51:57 jsurfer Exp $
+ * $Id: HTMLUtilities.java,v 1.2 2006-10-21 23:18:43 pombredanne Exp $
  * Copyright Narushima Hironori. All rights reserved.
  */
 package net.sourceforge.phpeclipse.wizards.html;
 
-
 /**
  * 
  */
 public class HTMLUtilities {
 
-       final static String[] specialMarks = {
-               "&", "&",
-               "<", "&lt;",
-               ">", "&gt;",
-               "\"", "&quot;",
-       };
+       final static String[] specialMarks = { "&", "&amp;", "<", "&lt;", ">",
+                       "&gt;", "\"", "&quot;", };
 
-       public static String escape(String text){
-               for (int i = 0; i < specialMarks.length; i+=2) {
-                       text = text.replaceAll(specialMarks[i], specialMarks[i+1]);
+       public static String escape(String text) {
+               for (int i = 0; i < specialMarks.length; i += 2) {
+                       text = text.replaceAll(specialMarks[i], specialMarks[i + 1]);
                }
                return text;
        }
-       
-       public static String unescape(String text){
-               for (int i = specialMarks.length-1; i>=0 ; i-=2) {
-                       text = text.replaceAll(specialMarks[i], specialMarks[i-1]);
+
+       public static String unescape(String text) {
+               for (int i = specialMarks.length - 1; i >= 0; i -= 2) {
+                       text = text.replaceAll(specialMarks[i], specialMarks[i - 1]);
                }
                return text;
        }
-       
-       
-       
-       
+
 }