Okay, quote.module filter and line break filters co-exist funkily, and it depends on which order they are listed in the filter order lineup.
Quote filter before Linebreak filter
If the quote.module filter comes before the linebreak filter (as I believe it should), then the linebreak filter doesn't add an opening <p> before the first line of the "quote-msg" <div>, nor does it add a </p> following the last line of the "quote-msg" <div>.
This applies in this manner for quotes which contain linebreaks in them (multi-line quotes). This causes (or is one cause of) pages that don't validate for XHTML.
For single-line quotes, <p> tags are still not added around the "quote-msg" <div> content (as it should be to be semantically correct).
Here is an example of output:
<div class="content">
<div class="quote-author">wazdog wrote:</div>
<div class="quote-msg">Just seeing what's up up here. Not much I suppose.</p>
<p>Hey, you over there! Look at my quote.</div>
<p>My new comment. Woah!</p>
</div>
Quote filter after Linebreak filter
If the quote.module filter comes after the linebreak filter, then the linebreak filter adds the correct number of opening and closing tags, just in the wrong places. The first <p> of the quote comes before the opening of the "quote-author" <div>, and the last </p> comes after the last </div> 尾of the quote.
Here's an example of this output:
<div class="content">
<p><div class="quote-author">joshua wrote:</div>
<div class="quote-msg">Just seeing what's up down here. Not much more now.</p>
<p>Hey, you over there! My quote kicks yours' a$$</div></p>
<p>I'll comment you.</p>
</div>
Fixing it
One way to fix it (but definitely not the correct way), is to have the quote.module filter function add the missing <p> and </p> tags. This is what I am currently doing on my site, but we need to figure out how to manage it correctly.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | quote_paging_filter_0.patch | 769 bytes | Wuk |
| #2 | quote.css-quote.module-diff-2006-07-23-11-27-03.patch | 1.42 KB | sanduhrs |
Comments
Comment #1
sanduhrsI changed from div to span, which produces the following code:
and lets the site validate at http://validator.w3.org/ .
Patches for quote.module and quote.css attached, please comment.
Comment #2
sanduhrsHa ha - patches attached, now!
Comment #3
desm0n commentedI hate patches as i can never get them to work. How do i apply this to quote for css and the module ?
I too have had issues with validting quote's and i have to manually edit each and every time.
Any help appreciated.
Comment #4
desm0n commentedPatch doesn't seem to address this issue.
After running the patch and quoting a node i get the following :-
Obviously this breaks the quote (the actual text doesn't contact within a box) and doesn't validate.
Comment #5
sanduhrsOn a fresh Drupal 4.7.4 install with patched quote.module I get the following result:
Which seems very well-formed to me and fixes all issues mentioned in the first post.
I don't know, why it's not working for you.
Did you change the order, filters are applied?
Do you use additional filters?
Could you please try it on a fresh Drupal install on your system?
Comment #6
Zen commentedAre you guys sure that you are setting the quote filter *before* the line break filter? That is the recommended method.
Please confirm.
Thanks,
-K
Comment #7
Wuk commentedI'm not sure what you mean when you say "...setting the quote filter *before* the line break filter...".
There is attached patch that works for me. Could you, please, take a look at the patch, and see if I may do this the way I did it.
Site validates at http://validator.w3.org/ , but I have to recreate all nodes and comments.
If I just edit node without content change it won't write new page code but it will keep old.
This is probably node issue, maybe a feature.
Comment #8
Wuk commentedIt doesn't work for quote inside quote.
Comment #9
Zen commentedI am still unable to reproduce this issue clearly. Please open a separate issue if need be with test input and instructions to reproduce bug.
Thanks,
-K