Javascript String cdata()

Description

Javascript String cdata()


String.prototype.cdata = function (){
    return '<![CDATA[' + this.replace(new RegExp(']]>','g'),']]><![CDATA[') + ']]>';
}



PreviousNext

Related