ccampbell / rainbow

Simple syntax highlighting library written in javascript
http://rainbowco.de
Apache License 2.0
3.3k stars 465 forks source link

Auto adding ="" #214

Open david-build opened 7 years ago

david-build commented 7 years ago

Hi dear friends. I have this code and use your highlighter:

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access 7 days"

But highlighter add ="" after mod_expires.c, and i'm see

<IfModule mod_expires.c="">
    ExpiresActive On
    ExpiresDefault "access 7 days"

How can i disable this auto-add ="" in tags? I'm try to use different languages for highlighting, but everywhere your plugin add ="" into .

screen shot 2017-01-07 at 04 56 19
joshgoebel commented 4 years ago

You need to properly escape your HTML:

&gt; not < Otherwise the browser just sees HTML... and parses it as such.