I have a site where users can post stuff (as in forums, comments, etc) using a customised implementation of TinyMCE. A lot of them like to copy & paste from Word, which
In my case, there was a pattern. The unwanted part always started with
So my solution was to cut out everything before and after this block:
$array = explode("'),10); echo $begin.$end;