G
Guest
Is there an nicer, more esthetic, way to scan a string and replace all
characters with higher than 159 decimal value with &#---; entities as
required by html.
This seems so terribly clumsy (although quite functional).
function highremove(asd) {
work="" ;
for (j=0; j<asd.length; j++) {
temp = asd.charCodeAt(j) ;
work+= (temp > 159) ? "&#"+temp+";" : asd.charAt(j) ; }
asd=work ;
return asd ; }
TIA
K
characters with higher than 159 decimal value with &#---; entities as
required by html.
This seems so terribly clumsy (although quite functional).
function highremove(asd) {
work="" ;
for (j=0; j<asd.length; j++) {
temp = asd.charCodeAt(j) ;
work+= (temp > 159) ? "&#"+temp+";" : asd.charAt(j) ; }
asd=work ;
return asd ; }
TIA
K