You just gotta love the HTML that comes out of the Microsoft Word. Particularly useful are the HTML comments, which are not closed, breaking the rest of the webpage below the paste. Yes, exactly where, for example, JavaScript is being loaded in the footer of the page.
This is a good old case of “Don’t trust any user input”, reinforced with “especially if they are using Microsoft tools”.
Oh yes, it’s a real problem, came across this before.
You really should use something like HTML Tidy to parse Word’s html output
Lev Blaivas liked this on Facebook.
I do, when I have control over the code. :)
Sam ‘Shaggy’ Beale liked this on Facebook.