Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
function dfStripScripts = function(data, type) | |
{ | |
// incase the response is full html with scripts remove them | |
type = type || 'text'; | |
if(type=='html'||type=='text'){ | |
/*return data.replace(/<script.*>.*?<\/script>/gi, '');*/ | |
return data.replace(/<script.*?>([\w\W\d\D\s\S\0\n\f\r\t\v\b\B]*?)<\/script>/gi, ''); | |
} | |
return data; | |
}; |