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

Pegdown escapes HTML in code blocks, but not in other output #236

Open jwgmeligmeyling opened 8 years ago

jwgmeligmeyling commented 8 years ago

Pegdown escapes HTML in code blocks, but not in other output. If I want to protect myself against XSS, I have to escape the input for pegdown manually, this however results in code blocks being escaped twice, resulting in wrong output.

I am looking for an option to either disable escaping for code blocks - and doing escaping myself, or an option to enable HTML escaping for all elements (which I think should have been default).