Here you can find the source of toHtml(String p_str)
public static final String toHtml(String p_str)
//package com.java2s; /**//www.j a v a 2 s .c o m * Copyright 2003 ZhongTian, Inc. All rights reserved. * * qingdao tec PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * $Id: DBUtil.java,v 1.1 2006/05/17 09:19:30 wiserd Exp $ * File:DBUtil.java * Date Author Changes * March 10 2003 wangdeliang Created */ public class Main { public static final String toHtml(String p_str) { if (p_str == null || p_str.length() == 0) return ""; p_str = p_str.replaceAll("<", "<"); p_str = p_str.replaceAll(">", ">"); p_str = p_str.replaceAll("&", "&"); p_str = p_str.replaceAll("\"", """); return p_str; } }