Javascript String encode_tags()

Description

Javascript String encode_tags()


String.prototype.encode_tags = function()
{
    return this.replace(/\<\?php/g,'(?php')
               .replace(/\?\>/g,'?)')
               .replace(/</g,'(lt;')
               .replace(/>/g,')gt;');
}



PreviousNext

Related