代码示例:
js端;用encodeURI()两次转码
var subject=encodeURI(encodeURI($("#subject").val()));
var content=encodeURI(encodeURI($(".summernote").code()));
java端;用URLDecoder.decode()方法解码
String subject=this.getRequest().getParameter("subject");
String content=this.getRequest().getParameter("content");
subject=URLDecoder.decode(subject, "UTF-8");
content=URLDecoder.decode(content, "UTF-8");