scrivo / highlight.php

A port of highlight.js by Ivan Sagalaev to PHP
BSD 3-Clause "New" or "Revised" License
695 stars 45 forks source link

HTML + JS detected as PHP??? #10

Closed toxyl closed 7 years ago

toxyl commented 7 years ago

I've just installed and set up your port which I'll be using for PHP, JS, CSS, HTML and SQL, but one of my very first test cases failed to be properly detected: <script>alert("XSS")</script> is neither detected as HTML nor as JavaScript, but instead as PHP. And the returned code uses &lt; and &gt; rather than < and > which looks rather ugly... so I was wondering if this is a feature I can turn off?

toxyl commented 7 years ago

Ohh, nevermind. Looks like it's a problem with the Markdown parser running on the source before applying the syntax highlight.