Skip to content
This repository has been archived by the owner. It is now read-only.

Support (but validate) HTML #2

Open
nex3 opened this issue Jan 17, 2013 · 5 comments
Open

Support (but validate) HTML #2

nex3 opened this issue Jan 17, 2013 · 5 comments

Comments

@nex3
Copy link
Contributor

nex3 commented Jan 17, 2013

GFM supports a limited subset of HTML, including at least <a> and <img> tags. We should support that as well, with sufficient scrubbing to make it safe to use.

@nex3
Copy link
Contributor Author

nex3 commented Jan 17, 2013

GitHub uses redcarpet for its rendering, so we can look at their implementation of this to figure out how to do it safely.

@nex3
Copy link
Contributor Author

nex3 commented Jan 19, 2013

GitHub actually supports all manner of HTML tags, including inline formatting tags all the way up to tables. We should match this behavior.

@jmesserly
Copy link

if you need a Python html5 parser, I can recommend https://code.google.com/p/html5lib :)
http://stackoverflow.com/questions/5266134/best-practice-for-allowing-markdown-in-python-while-preventing-xss-attacks

apparently they have a sanitizer too (we haven't look at that yet for Dart)

@jmesserly
Copy link

@nex3
Copy link
Contributor Author

nex3 commented Jan 19, 2013

Awesome, thanks for the tip, John.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants