PluginUtils { public static String removeTags(String str) { StringBuilder buf = new StringBuilder(); boolean inTag = false; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); switch (ch) { case '<': inTag = true; break; case '>': inTag = false; buf.append(' '); break; default: if (!inTag) { buf.append(ch); } } } return buf.toString(); } private  PluginUtils(); static int hexDigitToInt(char ch); static String escapeScriptTags(String str); static void escapeHtml(String str, StringBuilder buf); static void escapeHtmlAttribute(String str, StringBuilder buf); static String formatMoney(Decimal input, Locale locale); static String formatMoney(Decimal amount, String currencyCode, CLDR cldr); static String removeTags(String str); static String slugify(String value); static String truncate(String value, int maxLen, String ellipses); static void leftPad(long value, char padChar, int maxDigits, StringBuilder buf);  }
@Test public void testRemoveTags() { assertEquals(PluginUtils.removeTags("hi,<\nhello < >world"), "hi, world"); }