|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38167 Syntax Highlighting: Error
Submitted: 2006-07-20 19:18 UTC Modified: 2006-07-23 11:53 UTC
Avg. Score:4.7 ± 0.6
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: leestevens318 at msn dot com Assigned:
Status: Not a bug Package: *Programming Data Structures
PHP Version: 4.4.2 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: leestevens318 at msn dot com
New email:
PHP Version: OS:


 [2006-07-20 19:18 UTC] leestevens318 at msn dot com
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);

		$code = ob_get_contents();
	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;);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-21 06:47 UTC] leestevens318 at msn dot com
Updated: Hole script,
 [2006-07-23 11:53 UTC]
Until you can come up with a reproducing script (the one you provided does absolutely nothing) I'll bogus this since for me this works just fine.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 23:01:36 2024 UTC