Perf: optimized html escape helper