01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wikitext;
04:
05: public class Utils {
06:
07: private static final String[] specialHtmlChars = new String[] {
08: "&", "<", ">" };
09: private static final String[] specialHtmlEscapes = new String[] {
10: "&", "<", ">" };
11:
12: public static String escapeText(String value) {
13: for (int i = 0; i < specialHtmlChars.length; i++)
14: value = value.replaceAll(specialHtmlChars[i],
15: specialHtmlEscapes[i]);
16: return value;
17: }
18: }
|