showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript

Home Page:http://www.showdownjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Showdown escaping HTML Chars but not constantly

CuzImBisonratte opened this issue · comments

In regards to #218 where the outcome was that showdown didn't escape any HTML-Special-Chars I now have the Problem that sometimes HTML-Special Chars are converted and sometimes they aren't.

Here is some Code to reproduce this:

const showdown = require("showdown")
const converter = new showdown.Converter({ simpleLineBreaks: true });

converter.makeHtml("&")
// Output is: '<p>&amp;</p>'

converter.makeHtml("*&*");
// Output is: '<p><em>&</em></p>'

As far as I know see, HTML-Special-Chars are replaced when in plain Text but not, when they are formatted somehow.
Is there any way to turn this fully of or on for all text? I've searched through the config-options but didn't find any setting for this.

Don't know why this has been closed "by me", so reopening now