improved special html entities handling