Если вы используете PHP, попробуйте вызвать функцию htmlentities или htmlspecialchars .
htmlentities
htmlspecialchars