Use htmlspecialchars instead of htmlentities in some encodings. bugid:111116