codice:
String.prototype.clean = function(){
_this=this;
_this=_this.replace(/\&/g,"&");
_this=_this.replace(/\'/g,"'");
_this=_this.replace(/\"/g,""");
_this=_this.replace(/à/g,"à");
_this=_this.replace(/è/g,"è");
_this=_this.replace(/é/g,"é");
_this=_this.replace(/ì/g,"ì");
_this=_this.replace(/ò/g,"ò");
_this=_this.replace(/ù/g,"ù");
_this=_this.replace(/€/g,"€");
return _this;
};
x="òàèù";
alert(x.length)
x=x.clean();
alert(x.length)
fai il quote del messaggio per vedere bene il sorgente
ciao