Commit 3e23e619 authored by 罗超's avatar 罗超

解决乱码

parent 2f9e1947
......@@ -27,12 +27,12 @@ export default class HtmlUtil {
if(str.length === 0) {
return '';
}
s = str.replace(/&/g,'&');
// s = str.replace(/&/g,'&');
s = s.replace(/</g,'&lt;');
s = s.replace(/>/g,'&gt;');
s = s.replace(/ /g,'&nbsp;');
s = s.replace(/\'/g,'&#39;');
s= s.replace(/\"/g,'&quot;');
// s = s.replace(/ /g,'&nbsp;');
// s = s.replace(/\'/g,'&#39;');
// s= s.replace(/\"/g,'&quot;');
return s;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment