亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filterhtml.java

?? 這是學習Java必須讀懂兩套源代碼
?? JAVA
字號:
/**
 * Copyright (C) 2001 Yasna.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        Yasna.com (http://www.yasna.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Yazd" and "Yasna.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact yazd@yasna.com.
 *
 * 5. Products derived from this software may not be called "Yazd",
 *    nor may "Yazd" appear in their name, without prior written
 *    permission of Yasna.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL YASNA.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of Yasna.com. For more information
 * on Yasna.com, please see <http://www.yasna.com>.
 */

/**
 * Copyright (C) 2000 CoolServlets.com. All rights reserved.
 *
 * ===================================================================
 * The Apache Software License, Version 1.1
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by
 *        CoolServlets.com (http://www.coolservlets.com)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "Jive" and "CoolServlets.com" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please
 *    contact webmaster@coolservlets.com.
 *
 * 5. Products derived from this software may not be called "Jive",
 *    nor may "Jive" appear in their name, without prior written
 *    permission of CoolServlets.com.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL COOLSERVLETS.COM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of CoolServlets.com. For more information
 * on CoolServlets.com, please see <http://www.coolservlets.com>.
 */
 
package com.Yasna.forum.filter;

import java.util.*;
import java.io.*;

import com.Yasna.forum.*;
import com.Yasna.codeviewer.*;

/**
 * A ForumMessageFilter that escapes all HTML tags to prevent a user
 * from embedding arbitrary HTML in a message.
 */
public class FilterHtml extends ForumMessageFilter implements Serializable {

    /**
     * Property values of the filter.
     */
    private Properties props;

    /**
     * Property descriptions of the filter.
     */
    private Properties propDescriptions;

    /**
     * Creates a new filter not associated with a message. This is
     * generally only useful for defining a template filter that other
     * fitlers will be cloned from.
     */
    public FilterHtml() {
        super();
        props = new Properties();
        propDescriptions = new Properties();
    }

    /**
     * Creates a new filter wrapped around the specified message. This
     * constructor is normally called when cloning a filter template.
     *
     * @param message the ForumMessage to wrap the new filter around.
     * @param properties the property values for the filter.
     * @param propertyDescriptions the property descriptions for the filter.
     */
    public FilterHtml(ForumMessage message, Properties props,
            Properties propDescriptions)
    {
        super(message);
        this.props = new Properties(props);
        this.propDescriptions = new Properties(propDescriptions);
    }

    /**
     * Clones a new filter that will have the same properties and that
     * will wrap around the specified message.
     *
     * @param message the ForumMessage to wrap the new filter around.
     */
    public ForumMessageFilter clone(ForumMessage message){
        return new FilterHtml(message,props,propDescriptions);
    }

    /**
     * Returns the name of the filter.
     */
    public String getName() {
        return "HTML Filter";
    }

    /**
     * Returns a description of the filter.
     */
    public String getDescription() {
        return "Escapes HTML tags by converting &lt; and &gt; characters " +
                "into HTML esacpe sequences.";
    }

    /**
     * Returns the author of the filter.
     */
    public String getAuthor() {
        return "CoolServlets.com";
    }

    /**
     * Returns the major version number of the filter.
     */
    public int getMajorVersion() {
        return 1;
    }

    /**
     * Returns a description of the filter.
     */
    public int getMinorVersion() {
        return 0;
    }

    /**
     * Returns the value of a property of the filter.
     *
     * @param name the name of the property.
     * @returns the value of the property.
     */
    public String getFilterProperty(String name) {
        return props.getProperty(name);
    }

    /**
     * Returns the description of a property of the filter.
     *
     * @param name the name of the property.
     * @return the description of the property.
     */
    public String getFilterPropertyDescription(String name) {
        return propDescriptions.getProperty(name);
    }

    /**
     * Returns an Enumeration of all the property names.
     */
    public Enumeration filterPropertyNames() {
        //No properties, so return null.
        return null;
    }

    /**
     * Sets a property of the filter. Each filter has a set number of
     * properties that are determined by the filter author.
     *
     * @param name the name of the property to set.
     * @param value the new value for the property.
     *
     * @throws IllegalArgumentException if the property trying to be set doesn't
     *    exist.
     */
    public void setFilterProperty(String name, String value)
            throws IllegalArgumentException
    {
        if (props.getProperty(name) == null) {
            throw new IllegalArgumentException();
        }
        props.put(name, value);
    }

    /**
     * <b>Overloaded</b> to return the subject of the message with HTML tags
     * escaped.
     */
    public String getSubject() {
        return escapeHTMLTags(message.getSubject());
    }

    /**
     * <b>Overloaded</b> to return the body of the message with HTML tags
     * escaped.
     */
    public String getBody() {
        return escapeHTMLTags(message.getBody());
    }

    /**
     * This method takes a string which may contain HTML tags (ie, <b>, <table>,
     * etc) and converts the '<' and '>' characters to their HTML escape
     * sequences.
     *
     * @param input The text to be converted.
     * @return The input string with the characters '<' and '>' replaced with
     *  &lt; and &gt; respectively.
     */
    private String escapeHTMLTags( String input ) {
        //Check if the string is null or zero length -- if so, return
        //what was sent in.
        if( input == null || input.length() == 0 ) {
            return input;
        }
        //Use a StringBuffer in lieu of String concatenation -- it is
        //much more efficient this way.
        StringBuffer buf = new StringBuffer(input.length()+6);
        char ch = ' ';
        for( int i=0; i<input.length(); i++ ) {
            ch = input.charAt(i);
            if( ch == '<' ) {
                buf.append( "&lt;" );
            }
            else if( ch == '>' ) {
                buf.append( "&gt;" );
            }
            else {
                buf.append( ch );
            }
        }
        return buf.toString();
    }
} 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
51精品国自产在线| 国产精品女同互慰在线看| 色久优优欧美色久优优| 国产一区二区三区国产| 麻豆高清免费国产一区| 日韩av一二三| 久久66热偷产精品| 蜜桃久久av一区| 免费人成精品欧美精品 | 风间由美一区二区av101| 免费的成人av| 国产在线精品视频| 国产大片一区二区| 东方aⅴ免费观看久久av| 成人精品gif动图一区| 风间由美一区二区三区在线观看| 国产91丝袜在线18| 成人高清视频在线| 成人av免费在线播放| av在线这里只有精品| 色呦呦国产精品| 欧美美女直播网站| 日韩三级在线观看| 久久综合色婷婷| 国产精品进线69影院| 中文字幕一区免费在线观看| 亚洲三级在线免费| 天堂影院一区二区| 精品在线一区二区三区| 国产精品一区二区x88av| 成人黄动漫网站免费app| 91免费在线看| 欧美丝袜丝交足nylons图片| 91精品国产综合久久福利软件| 精品国产制服丝袜高跟| 欧美激情综合在线| 亚洲午夜激情av| 韩国女主播一区二区三区| www.亚洲国产| 在线91免费看| 国产免费久久精品| 亚洲aaa精品| 韩国女主播一区二区三区| 99久精品国产| 日韩免费高清视频| 亚洲欧美日韩在线播放| 久久99精品视频| 色噜噜狠狠色综合欧洲selulu| 欧美一区二区三区的| 国产精品二三区| 天天综合色天天综合色h| 国产成人在线色| 欧美日韩精品免费| 国产精品理伦片| 六月丁香婷婷久久| 在线视频亚洲一区| 国产亚洲视频系列| 午夜视频一区二区| 91亚洲精品一区二区乱码| 日韩免费看的电影| 亚洲综合另类小说| 成人的网站免费观看| 久久精品一区二区三区四区| 亚洲一区中文在线| 成人a免费在线看| www国产成人| 免费成人深夜小野草| 欧美四级电影在线观看| 国产精品视频一区二区三区不卡| 日韩黄色一级片| 色八戒一区二区三区| 久久精品人人做人人综合 | 国产欧美一区二区精品忘忧草| 亚洲国产视频网站| 99国产精品视频免费观看| 久久久久国产精品麻豆| 日精品一区二区三区| 日本高清不卡aⅴ免费网站| 国产日韩欧美高清在线| 韩国视频一区二区| 日韩欧美一区二区三区在线| 午夜视频在线观看一区二区三区| 色婷婷综合久久久久中文一区二区 | 成人白浆超碰人人人人| www激情久久| 国产自产高清不卡| 欧美成人性战久久| 日本不卡一区二区三区| 欧美日韩免费视频| 亚洲制服丝袜av| 在线视频你懂得一区| 中文字幕综合网| av在线一区二区| 1024精品合集| 成人黄色综合网站| 中文字幕巨乱亚洲| 成人免费毛片片v| 欧美国产激情一区二区三区蜜月| 国产精品综合一区二区三区| 日韩精品一区在线观看| 美腿丝袜一区二区三区| 日韩一区二区电影在线| 久久av资源网| 精品国产91久久久久久久妲己| 麻豆精品国产传媒mv男同| 欧美大片国产精品| 麻豆国产精品官网| 2021国产精品久久精品| 国产精品99久久久久久似苏梦涵 | 一区二区三区**美女毛片| 色婷婷一区二区三区四区| 亚洲精品一卡二卡| 欧美在线影院一区二区| 亚瑟在线精品视频| 8x福利精品第一导航| 久久疯狂做爰流白浆xx| 国产亚洲欧美激情| 成人久久18免费网站麻豆| 日韩美女精品在线| 欧美亚洲一区二区在线| 手机精品视频在线观看| 日韩色视频在线观看| 国产精品一区二区免费不卡| 国产欧美综合在线观看第十页| 91在线视频网址| 亚洲综合999| 日韩欧美国产综合在线一区二区三区| 免费成人美女在线观看| 国产丝袜美腿一区二区三区| 99久久免费精品| 日韩主播视频在线| 久久综合国产精品| 99久久伊人网影院| 亚洲国产毛片aaaaa无费看| 精品久久久久一区二区国产| 成人av在线影院| 五月婷婷久久综合| 日本一区二区三区dvd视频在线| 91在线精品秘密一区二区| 日日夜夜免费精品| 国产欧美日韩在线观看| 欧美午夜一区二区三区| 精品亚洲aⅴ乱码一区二区三区| 国产精品―色哟哟| 91.com视频| 成人黄色综合网站| 日本va欧美va欧美va精品| 国产欧美va欧美不卡在线| 欧美三级视频在线| 国产酒店精品激情| 亚洲国产欧美一区二区三区丁香婷| 欧美精品一区在线观看| 欧美视频在线观看一区二区| 另类小说一区二区三区| 日韩理论在线观看| 日韩欧美国产午夜精品| 97se亚洲国产综合在线| 精品在线播放午夜| 伊人一区二区三区| 久久综合九色综合欧美98| 欧美日韩一二三| av亚洲精华国产精华精| 蜜臀av一级做a爰片久久| 亚洲图片另类小说| 久久久777精品电影网影网| 69久久夜色精品国产69蝌蚪网| 成人免费黄色在线| 久久精品国产亚洲a| 一区二区三区免费网站| 欧美激情自拍偷拍| 日韩精品最新网址| 欧美性xxxxxx少妇| 91免费精品国自产拍在线不卡| 激情综合色综合久久综合| 爽好多水快深点欧美视频| 亚洲精品中文在线| 国产精品久久久久久久浪潮网站| 精品福利一区二区三区| 欧美电影一区二区| 日本高清不卡视频| 99国产精品视频免费观看| 国产成人亚洲综合a∨婷婷图片 | 91豆麻精品91久久久久久| 福利一区二区在线| 国产精品亚洲а∨天堂免在线| 免费日韩伦理电影| 视频一区二区三区在线| 亚洲一区二区综合| 亚洲免费电影在线| 中文字幕一区二区三区在线不卡 | 精品国产一区二区三区不卡| 欧美麻豆精品久久久久久| 91久久精品国产91性色tv| 99精品视频一区| a级精品国产片在线观看| 国产成人av影院| 国产高清精品在线| 国产一区二区免费在线| 国产一区在线不卡| 国内外成人在线|