EscapeUtil.java :  » GWT » akjava-gwt-tools » com » akjava » wiki » client » core » Java Open Source

Java Open Source » GWT » akjava gwt tools 
akjava gwt tools » com » akjava » wiki » client » core » EscapeUtil.java
/*
 * Created on 2004/11/24
 * Author aki@akjava.com
 * License Apache2.0 or Common Public License
 */
package com.akjava.wiki.client.core;

import com.akjava.wiki.client.util.StringUtils;

/**
 * 
 *
 */
public class EscapeUtil {
public static String escape(String text){
    String result=text;
    result=StringUtils.replace(result,"&","&");
    result=StringUtils.replace(text,"<","&lt;");
    
    result=StringUtils.replace(result,">","&gt;");
   
    result=StringUtils.replace(result,"\"","&quot;");
    return result;
}
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.