I'm using some special characters like × (×
) or … (…
) in my html pages.
Somewhere I'm using unicode character directly, but somewhere I'm using encoded entity like &hellip
.
I want to tidy up my code and can't decide what notation is better.
I could find just two pros and cons:
- using character directly I can set text in javascript using
text
method like$("#button").text("Loading…")
, instead ofhtml
which could lead to XSS issues - using characters directly can lead to encoding issues in case of misconfigured server
Maybe I'm missing something important? What is the best practice?