sirthias / pegdown

A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions
http://pegdown.org
Apache License 2.0
1.29k stars 218 forks source link

Currently Pegdown escapes characters used by extensions that are not enabled. #179

Closed vsch closed 9 years ago

vsch commented 9 years ago

Escaping extra characters removes the \ in cases where it is not expected. For example, turning all extensions off and parsing a sequence | ~ : will result in the HTML only containing | ~ :+1:

The escaped character rule should be based on the currently turned on extensions including the plugins.

Fixed with test for *_&[]<>!#\\'\".+-(){}:|~ which were all the characters included in the current version. Any characters returned by theplugin.getSpecialChars()` will be added to the list of escapable characters.

sirthias commented 9 years ago

Closed by #181.