Upgrading the function html_escape()

Escaping twice can be prevented by setting the second argument to FALSE.

See #3201

Still not really readable ... It *doesn't have* to be a ternary.