arturadib / strapdown

Instant and elegant Markdown documents in the browser
http://strapdownjs.com
MIT License
2.48k stars 410 forks source link

Bug in & conversion #80

Open razzul opened 7 years ago

razzul commented 7 years ago

code is not converting correctly

if (in_array($this->bean->product_offering, $sugar_config['enterprise_mail_po'])) {

because of below line

function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#39;');}

if I update the code like below its working fine

function escape(html,encode){return html.replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#39;');}