Show
Ignore:
Timestamp:
06/09/08 07:13:12 (6 months ago)
Author:
magi@…
Message:

Merged [4751] from trunk to 5.2 branch: fixes #1767 (Less than character (<) is not rendered in Select)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/5.2/src/com/itmill/toolkit/terminal/gwt/client/Util.java

    r4328 r4790  
    77import java.util.Iterator; 
    88 
     9import com.google.gwt.user.client.DOM; 
    910import com.google.gwt.user.client.Element; 
    1011import com.google.gwt.user.client.ui.HasWidgets; 
     
    123124    return false; 
    124125    }-*/; 
     126 
     127    private static final Element escapeHtmlHelper = DOM.createDiv(); 
     128 
     129    /** 
     130     * Converts html entities to text. 
     131     *  
     132     * @param html 
     133     * @return escaped string presentation of given html 
     134     */ 
     135    public static String escapeHTML(String html) { 
     136        DOM.setInnerText(escapeHtmlHelper, html); 
     137        return DOM.getInnerHTML(escapeHtmlHelper); 
     138    } 
    125139}