means that users can post links and pictures, but cannot send html and css styles!
the current way of writing is:
var result=str.replace(/(<\/?)([a-z]+)(\s[\w\W]*?)?(>)/ig,function(s0,s1,s2,s3,s4) {
if (!/^(img|a)$/.test(s2))
return "";
if(s3)
s3 = s3.replace(/\s+(id|class|style)(=(([\"\"]).*?\4|\S*))?/g,"");
return s1+s2+(s3||"")+s4;
});
this is OK, but if the user publishes
or >
these will be replaced with html entities;
ask God to write a paragraph that can post links and pictures, but cannot send html and css styles, but can publish
>
characters like