colder          Sat Feb 10 11:42:27 2007 UTC

  Modified files:              
    /phpdoc/scripts     html_syntax.php 
  Log:
  - remove entities decoding
  - Fix #40405 (htmlentities example)
  - Fix htmlspecialchars example
  
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/html_syntax.php?r1=1.13&r2=1.14&diff_format=u
Index: phpdoc/scripts/html_syntax.php
diff -u phpdoc/scripts/html_syntax.php:1.13 phpdoc/scripts/html_syntax.php:1.14
--- phpdoc/scripts/html_syntax.php:1.13 Sun Feb  4 01:05:28 2007
+++ phpdoc/scripts/html_syntax.php      Sat Feb 10 11:42:27 2007
@@ -26,16 +26,12 @@
 }
 set_time_limit(5*60); // can run long, but not more than 5 minutes
 
-function callback_html_number_entities_decode($matches) {
-       return chr($matches[1]);
-}
-
 function callback_highlight_php($matches) {
-       $with_tags = preg_replace_callback("!&#([0-9]+);!", 
"callback_html_number_entities_decode", trim($matches[1]));
+       $matches[1] = trim($matches[1]);
        if ($GLOBALS["TYPE"] == "php") {
-               return "\n<?php\nhighlight_php('". addcslashes($with_tags, 
"'\\") ."');\n?>\n";
+               return "\n<?php\nhighlight_php('". addcslashes($matches[1], 
"'\\") ."');\n?>\n";
        } else { // "html"
-               return highlight_string($with_tags, true);
+               return highlight_string($matches[1], true);
        }
 }
 

Reply via email to