Matching not only unclosed [quote] and [list] tags but also unopened [/quote] and [/list]
mjourney2 - June 29, 2008 - 14:05
| Project: | Bbcode |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | naudefj |
| Status: | postponed |
Jump to:
Description
Sometimes people can delete the opening [quote] tag and leave the closing [/quote] hanging.
In order to address this, I added the following to bbcode-filter.inc around line 62
if($unclosed > 0)
for ($i = 0; $i < $unclosed; $i++)
$body .= '[/quote]';
else if ($unclosed < 0)
for ($i = $unclosed; $i < 0; $i++)
$body = '[quote]'.$body;
...
if($unclosed > 0)
for ($i = 0; $i < $unclosed; $i++)
$body .= '[/list]';
else if ($unclosed < 0)
for ($i = $unclosed; $i < 0; $i++)
$body = '[list]'.$body;

#1
Can you please submit a patch?