Hi Robinson,
Just thought I would share a fairly ugly workaround to this problem. Simply add the line:
error_reporting(0);
below the opening php tag. It’s ugly because it doesn’t fix the underlying problem but simply covers it up.
The problem arises because the visual editor in WP puts spaces between tags. Eg,
<p>text here</p> <p>more text here</p>
+— space character in here.
Hand edit to remove these in the html pane & the problem goes away. But make an edit in the visual editor, problem comes back. It is also a problem with posts uploaded from Microsoft Live Writer, which is a pain in the (_!_) because it’s so easy for non-techos to use.
It would be great if there was a way to ‘desensitise’ the loadXML function but I’m not smart enough to figure that one out.
BTW I tried it also in a PHP4 environment & the problem is still there in the loadHTML function.
However – it still puts glossary links in all the right places, which is the Desired Outcome.