The "htmlspecialchars" was butchering the entites-encoded output