#38167 [NEW]: Syntax Highlighting: Error

From: Date: Thu, 20 Jul 2006 19:18:44 +0000
Subject: #38167 [NEW]: Syntax Highlighting: Error
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99693@lists.php.net to get a copy of this message
From:             leestevens318 at msn dot com
Operating system: Windows
PHP version:      4.4.2
PHP Bug Type:     *Programming Data Structures
Bug description:  Syntax Highlighting: Error

Description:
------------
Syntax Highlighting Error, i'm useing you syntax highlighting, and get a
error when i use speach marks inside brackets.



Reproduce code:
---------------
function highlight($code='') {
	if(!$this->preprocess($code)) {
		$code = '<code>' . $code . '</code>'; 
	} else {
		$code = str_replace('< ?php', '<?php', $code);
		$code = str_replace('<br />', '', $code);

		ob_start();
		highlight_string($code);
		$code = ob_get_contents();
		ob_end_clean();
	}
	return stripslashes($code);
}

Expected result:
----------------
Should of Printed out:

$wpdb->get_var(hSELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0);

With Syntax Highlighting.

Actual result:
--------------
When it's read and went throught the Syntax Highlighting, it comes out
like this:

$wpdb->get_var(&#8221;SELECT COUNT(*) FROM $wpdb->comments WHERE
comment_approved = 0&#8221;);

-- 
Edit bug report at http://bugs.php.net/?id=38167&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38167&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38167&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38167&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38167&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=38167&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38167&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38167&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38167&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38167&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38167&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=38167&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=38167&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38167&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38167&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38167&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38167&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38167&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38167&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38167&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38167&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#99693) next »