Closed Thread Icon

Topic awaiting preservation: Help with PHP screwing with my quotes... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24987" title="Pages that link to Topic awaiting preservation: Help with PHP screwing with my quotes... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Help with PHP screwing with my quotes... <span class="small">(Page 1 of 1)</span>\

 
Ensellitis
Bipolar (III) Inmate

From: New York, USA
Insane since: Feb 2002

posted posted 02-11-2005 06:17

What in this code is causing the PHP source it prints is making all the " turn into ? ?

code:
<?php

$phpizer_div_class="code";

function phpizer($text) {
global $phpizer_div_class;
$parse=0;
$codebuffer="";
$finaltext="";
$count=1;

$lines=split("\n",stripslashes($text));

foreach($lines as $theline){
if(preg_match("/\[php\]/",$theline)){
$parse=1;
$theline="";
}

if(preg_match("/\[\/php\]/",$theline)){
$parse=0;
$finaltext .= "<div id=\"phpizer_div_" . $count . "\" class=\"" . $phpizer_div_class . "\">\n" . highlight_string("<?php\n" . $codebuffer . "\n?>\n",1) . "</div>\n";
$count++;
$codebuffer="";
$theline="\n";
}

if($parse==0){
$finaltext .= $theline;
}

else{
$codebuffer .= $theline;
}
}
return $finaltext;
}


add_filter('the_content', 'phpizer', 8);
add_filter('comment_text', 'phpizer', 8);

?>





:: WWW || Contact || Deviations || ThoughtPrism ::

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 02-11-2005 15:23

so your " get turned into fancy quotes?

No idea, except for the highlight_string call - what happens if you just use the string without that call?

« BackwardsOnwards »

Show Forum Drop Down Menu