bestlong / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

php code rendered in the syntax area goes execute! #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I like very much this script but I have find something....

1. write this code in <textarea> tag:

<textarea name="code" class="html" cols="60" rows="32" readonly="readonly"> 

function ReturnPage($page=false) {
if (!$page) $page = (isset($_SERVER['HTTP_REFERER']) &&
!empty($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : _PATH_SITE;
if (!headers_sent()) header("Location: ".$page);
else echo "\n<meta http-equiv=\"refresh\" content=\"0;URL=".$page."\">\n";
exit;
}

</textarea>

2. save the post

3. viewing the post the snippet is executed and the page goes in a
refreshing continuous loop...

I would like that the snippet of a code was simply showed as a static
thing, not executed...
environment:
PHP5, MYSQL5, Linux webserver, Apache

Original issue reported on code.google.com by serb...@gmail.com on 29 Jul 2008 at 10:13

GoogleCodeExporter commented 9 years ago
SyntaxHighlighter is in javascript and doesn't have ability to execute php 
code. You
have to double check your page.

Original comment by alex.gor...@gmail.com on 30 Jul 2008 at 1:57