Properly encode html entities