added patch for htmlspecialchars