htmlspecialchars sounds wrong. we do input encoding, it probably already is specialchared