Active
Project:
Bbcode
Version:
6.x-1.2
Component:
Markup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2009 at 16:28 UTC
Updated:
4 May 2009 at 16:06 UTC
The BBCode:
[quote]This quote
contains
paragraph breaks.[/quote]
produces the HTML:
<div class="content">
<p>
<div class="bb-quote">
Quote:<blockquote class="bb-quote-body">This quote</blockquote>
</div>
</p>
<p>contains</p>
<p>paragraph breaks.</p>
</div>
(HTML indentation re-done manually to make the issue more clear.)
The div.bb-quote should affect the entire quote rather than only the first paragraph. Presumably, this calls for putting the three paragraphs inside the div and blockquote tags rather than the div/blockquote being placed inside the first paragraph.
Comments
Comment #1
reikiman commentedI'm seeing the same bug as reported by one of my users: http://visforvoltage.org/forum/6374-quotations-are-all-buggered
Comment #2
reikiman commentedFWIW I have both the quote module & bbcode enabled. Both of them do [quote] processing.
I took a look at my input filters and have found a fix.
First, putting the quote filter before bbcode filter made the situation worse.
Second, I noticed I have the HTML Corrector filter installed. Turning that filter off in input formats corrected the problem. Hence it appears the HTML Corrector interferes causing the problem.
Comment #3
Dave Sherohman commentedI have confirmed that this problem is masked by disabling the HTML corrector. The example BBCode markup given in the original report now produces the HTML output:
(Again, manually reformatted to clarify structure.)
Given that this markup is not correctly nested, I would argue that this is a bug in the BBCode module and should be fixed by moving the opening and closing paragraph tags inside of the div.bb-quote and blockquote, as hypothesized in the original bug report.
Comment #4
Dave Sherohman commentedIt appears that the nesting comes up correctly (and to HTML Corrector's satisfaction) by changing lines 183-186 of bbcode-filter.inc to:
It's basically just adding a
</p>at the start and a<p>at the end of each line's output string.This does have the minor drawback of producing empty
<p></p>pairs before and after each quote block, but at least the HTML is now properly nested and will display properly with HTML Corrector active.While it may not be the optimal solution, this change resolves the issue at hand.