Thanks for your replies MrMxyzptlk, BFM_Kiwi.
Kiwi I don't quite follow what the end result of what you are suggesting would be.
Once the string is escaped, and looks like this 'hello%3Cbr%3Enew%20line', then what...?
I could then replace all instances of
%xx with a SPACE, for example? (or indeed selecting specific symbols to replace)
Or....?
I don't see how the escape function enables you to display html characters without executing them.
Also, what characters are unsafe other than
& < > " ' ? php functions such as
htmlspecialcharacters only deal with these...