Closed (fixed)
Project:
Bbcode
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Aug 2007 at 16:13 UTC
Updated:
17 Aug 2007 at 05:51 UTC
Jump to comment: Most recent file
new list processing code (in HEAD) has some error.. try this text:
[list]
[*] {$var
[/list]
I got this:
Fatal error: preg_replace() [function.preg-replace]: Failed evaluating code: "<". $l_type[""]["tag"] ." class=\"bb-list\" style=\"list-style-type:". $l_type[""]["style"] .";\">". " <li> {$var</li> " ."</". $l_type[""]["tag"] .">"
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | bbcode_eval_patch.txt | 2.75 KB | mindless |
Comments
Comment #1
mindless commentedAlso try:
[list]
[*] $_SERVER[PHP_SELF]
[/list]
The variable is expanded!
Comment #2
mindless commented[size=15] $_SERVER[PHP_SELF] [/size]
Comment #3
naudefj commentedWe need to get this fixed ASAP.
Would you be able to prepare a patch?
Comment #4
mindless commentedyes, it will be ready within the hour.
Comment #5
mindless commentedPatch attached. 2 fixes: the main one is changing ".." to '..' in the regexps using the "e" (eval) modifier. This prevents variables from being expanded. After that the only problem was " being changed to \", as preg_replace escapes both single and double quotes. The [size] code already had stripslashes, but this is too much as it would change \a to a.. we only want to strip the backslash from " characters where it was added. So I used str_replace.
Comment #6
naudefj commentedPatch was applied - http://drupal.org/cvs?commit=76137
Thank you very much Alan!
Comment #7
(not verified) commented