Is it possible to use JavaScript to break the HTML of a page?

Posted by Karl Brown on Stack Overflow See other posts from Stack Overflow or by Karl Brown
Published on 2012-06-22T20:52:29Z Indexed on 2012/06/22 21:16 UTC
Read the original article Hit count: 210

Filed under:
|

I've been asked at work whether it is possible to write, on purpose or by accident, JavaScript that will remove specific characters from a HTML document and thus break the HTML. An example would be adding some JavaScript that removes the < symbol in the page. I've tried searching online and I know JavaScript can replace strings, but my knowledge of the language is negligible.

I've been asked to look into it as a way of hopefully addressing why a site I work on needs to have controls over who can add bespoke functionality to the page. I'm hoping it's not possible but would be grateful for the peace of mind!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html