List of usage examples for org.apache.wicket.util.string StringEscapeUtils escapeXml
public static void escapeXml(Writer writer, String str) throws IOException
Escapes the characters in a String
using XML entities.
From source file:sf.wicklet.wicketext.util.XmlUtil.java
License:Apache License
@Override public CharSequence quoteAttr(final String value) { final StringPrintWriter buf = new StringPrintWriter(value.length() * 2); buf.append('"'); try {/*from ww w . j av a2 s . com*/ StringEscapeUtils.escapeXml(buf, value); } catch (final IOException e) { throw new RuntimeException(e); } buf.append('"'); return buf.toString(); }