X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/core/PHPDebugUtils.java b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/core/PHPDebugUtils.java index 8bdba0b..70093d8 100644 --- a/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/core/PHPDebugUtils.java +++ b/net.sourceforge.phpeclipse.xdebug.core/src/net/sourceforge/phpeclipse/xdebug/core/PHPDebugUtils.java @@ -7,8 +7,7 @@ import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class PHPDebugUtils { - public static String getAttributeValue(Node CurrentNode, - String AttributeName) { + public static String getAttributeValue(Node CurrentNode, String AttributeName) { String strValue = ""; if (CurrentNode.hasAttributes()) { NamedNodeMap listAttribute = CurrentNode.getAttributes(); @@ -18,41 +17,41 @@ public class PHPDebugUtils { } return strValue; } - + public static String escapeString(String string) { - StringBuffer escString = new StringBuffer(); - Pattern pattern = Pattern.compile("[a-zA-Z0-9\\._-]"); - Matcher matcher; - for (int i = 0; i < string.length(); i++) { - char c = string.charAt(i); - matcher = pattern.matcher("" + c); - if (matcher.find()) + StringBuffer escString=new StringBuffer(); + Pattern pattern = Pattern.compile("[a-zA-Z0-9\\._-]"); + Matcher matcher; + for (int i= 0; i 2) - string.append(s[i].substring(2)); - + for(int i=1 ; i2) + string.append(s[i].substring(2)); + } return string.toString(); } + }