In an rails application, users can create events and post an url to link to the external event site.
How do I sanitize the urls to prevent XSS links?
Thanks in advance,
example of XSS, which is not preventable by rails' sanitize method
@url = "javascript:alert('XSS')"
<a href="<%=sanitize @url%>">test link</a>