It depends on the context.
In addition, coding is less than just a flash of ideas. You should simply encode all characters that have special meaning and can be used for XSS ...
, , , - ...
. .
...
http://www.example.com" onclick="window.location = 'http://nasty.com'; return false;
, , ...
<a href="http://www.example.com" onclick="window.location = 'http://nasty.com'; return false;">View user website</a>
, .