Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitize(url).xss() is messing up twitter URLs with hashtags #206

Closed
jonathanong opened this issue Jul 23, 2013 · 1 comment
Closed

sanitize(url).xss() is messing up twitter URLs with hashtags #206

jonathanong opened this issue Jul 23, 2013 · 1 comment

Comments

@jonathanong
Copy link

sanitize('https://twitter.com/search?q=%23JusticeforCharles').xss()

becomes

'https://twitter.com/search?q=#JusticeforCharles'

which completely destroys my links as the # is now a hash instead of a search term.

@jonathanong
Copy link
Author

actually i'm just going to avoid this issue by not sanitizing my markdown since marked should handle any potential security issues. you can close if you don't want to fix since i'm not sure what the scope of .xss() is

chriso added a commit that referenced this issue Oct 31, 2013
The xss() function was originally a port of the XSS filter from
CodeIgniter. I added it to the library because there wasn't an
alternative at the time. Unfortunately I don't have the time or
expertise to maintain the XSS filter or keep merging upstream
changes.

If you need one for your app, I suggest looking at Caja sanitisation
engine maintained by Google. (https://code.google.com/p/google-caja/
source/browse/trunk/src/com/google/caja/plugin/html-sanitizer.js)

Closes #123, #138, #181, #206, #210, #221, #223, #226, #227, #231, #232
@chriso chriso closed this as completed Oct 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants