001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.util;
016    
017    /**
018     * @author Brian Wing Shun Chan
019     * @author Clarence Shen
020     * @author Harry Mark
021     * @author Samuel Kong
022     */
023    public interface Html {
024    
025            public String escape(String text);
026    
027            public String escape(String text, int mode);
028    
029            public String escapeAttribute(String attribute);
030    
031            public String escapeCSS(String css);
032    
033            public String escapeHREF(String href);
034    
035            public String escapeJS(String js);
036    
037            public String escapeURL(String url);
038    
039            public String escapeXPath(String xPath);
040    
041            public String escapeXPathAttribute(String xPathAttribute);
042    
043            public String extractText(String html);
044    
045            public String fromInputSafe(String text);
046    
047            public String render(String html);
048    
049            public String replaceMsWordCharacters(String text);
050    
051            public String stripBetween(String text, String tag);
052    
053            public String stripComments(String text);
054    
055            public String stripHtml(String text);
056    
057            public String toInputSafe(String text);
058    
059            public String unescape(String text);
060    
061            public String unescapeCDATA(String text);
062    
063            public String wordBreak(String text, int columns);
064    
065    }