-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
escape HTML <,>,& and quotes, and also in attributes values
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4816d73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fucks me over, it should not double-escape
4816d73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, and also numeric entities :
Though double-escaping has to be done in code blocks and inline (as said in the doc). I'll look into it.
4816d73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
visionmedia: We currently don't support any inline HTML so 'double escaping' is a funny case.
You can see how most other implementations behave here: http://babelmark.bobtfish.net/?markdown=foo%26amp+co%0D%0A%0D%0A%3Cp%3Efoo%26amp%3Bco%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3Efoo%26co%3C%2Fp%3E&compare=on&src=1&dest=2
4816d73
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm, i've switched to a different markdown lib that supports both inline html and doesn't have this issue