public static String serialize(Method method, Object data) throws SerializationException {
String result = RPC.encodeResponseForSuccess(method, data, CmsPrefetchSerializationPolicy.instance());
return result;</BUG>
}
<BUG>public static String serializeForJavascript(Method method, Object data) throws SerializationException {
String result = serialize(method, data);
result = escape(result);
return result;

}
private static String escape(String s) {
String ret = s.replaceAll("\\\\", "\\\\\\\\");
return ret.replaceAll("'", "\\\\'");</BUG>
}

public static String serialize(Method method, Object data) throws SerializationException {
String result = RPC.encodeResponseForSuccess(method, data, CmsPrefetchSerializationPolicy.instance());
result = CmsEncoder.escapeXml(result, true);
return result;
}
public static StringBuffer wrapScript(StringBuffer sb) {
sb.insert(0, SCRIPT_TAG_OPEN);
sb.append(SCRIPT_TAG_CLOSE).append("\n");
return sb;
}
