htmlfilter.java
来自「Jive是基于JSP/JAVA技术构架的一个大型BBS论坛系统,这是Jive论坛」· Java 代码 · 共 56 行
JAVA
56 行
/** * $RCSfile: HTMLFilter.java,v $ * $Revision: 1.1.1.1 $ * $Date: 2002/02/27 16:59:24 $ * * Copyright (C) 1999-2001 CoolServlets, Inc. All rights reserved. * * This software is the proprietary information of CoolServlets, Inc. * Use is subject to license terms. */package com.jivesoftware.forum.filter;import java.util.*;import com.jivesoftware.forum.*;import com.jivesoftware.util.*;/** * A ForumMessageFilter that converts newline characters into HTML <br> tags. * This filter should only be run after any HTML stripping filters. */public class HTMLFilter extends ForumMessageFilter { /** * 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){ HTMLFilter filter = new HTMLFilter(); filter.message = message; return filter; } public boolean isCacheable() { return true; } /** * <b>Overloaded</b> to return the subject of the message with HTML tags * escaped. */ public String getSubject() { return StringUtils.escapeHTMLTags(message.getSubject()); } /** * <b>Overloaded</b> to return the body of the message with HTML tags * escaped. */ public String getBody() { return StringUtils.escapeHTMLTags(message.getBody()); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?