001    /**
002     * Copyright (c) 2000-present 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    import java.util.Map;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     * @author Clarence Shen
022     * @author Harry Mark
023     * @author Samuel Kong
024     */
025    public interface Html {
026    
027            public String buildData(Map<String, Object> data);
028    
029            public String escape(String text);
030    
031            public String escape(String text, int mode);
032    
033            public String escapeAttribute(String attribute);
034    
035            public String escapeCSS(String css);
036    
037            public String escapeHREF(String href);
038    
039            public String escapeJS(String js);
040    
041            public String escapeJSLink(String link);
042    
043            public String escapeURL(String url);
044    
045            public String escapeXPath(String xPath);
046    
047            public String escapeXPathAttribute(String xPathAttribute);
048    
049            public String extractText(String html);
050    
051            public String fromInputSafe(String text);
052    
053            public String getAUICompatibleId(String text);
054    
055            public String render(String html);
056    
057            /**
058             * @deprecated As of 7.0.0, with no direct replacement
059             */
060            @Deprecated
061            public String replaceMsWordCharacters(String text);
062    
063            public String replaceNewLine(String html);
064    
065            public String stripBetween(String text, String tag);
066    
067            public String stripComments(String text);
068    
069            public String stripHtml(String text);
070    
071            public String toInputSafe(String text);
072    
073            public String unescape(String text);
074    
075            public String unescapeCDATA(String text);
076    
077            public String wordBreak(String text, int columns);
078    
079    }