Test for XML
Fix undefined function errors

Sooo... the XML test found a problem! the h() function (defined in micromvc) doesn't exist!
Replace all its uses with htmlspecialchars().