MediaWiki:Gadget-Prosesize.js: Difference between revisions

Content deleted Content added
escape the output of sizeElement to guard against cross-site scripting vulnerabilities; while the script is not currently vulnerable, proper escaping will help to future-proof it
Exclude style tags from text length
Line 79:
// Exclude from length, and don't set background yellow
id.childNodes[ i ].className += ' prosesize-special-template';
} else if (id.childNodes[ i ].tagName !== 'STYLE') {
} else {
// Exclude style tags
textLength += getLength( id.childNodes[ i ] );
}