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.

Comments

sanduhrs’s picture

Status: Active » Needs review

I changed from div to span, which produces the following code:

<div class="content">
<p>User text.</p>
<p><span class="quote-msg"><span class="quote-author">User wrote:</span>Quoted text.</span><br />
User text.</p>
</div>

and lets the site validate at http://validator.w3.org/ .
Patches for quote.module and quote.css attached, please comment.

sanduhrs’s picture

Ha ha - patches attached, now!

desm0n’s picture

I 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.

desm0n’s picture

Status: Needs review » Needs work

Patch doesn't seem to address this issue.

After running the patch and quoting a node i get the following :-

    <div class="content">
      <p><span class="quote-msg"><span class="quote-author">desm0n wrote:</span></p>
<p>
Port Talbot Chat has been updated today on various parts to counteract potential security exploits.
</p>
<p>
There is nothing to be alarmed with here its just that a site admin has to keep up with the latest security exploit issues or run the risk of hackers gaining access to key parts of the website. This is a preventive action only but i bring this to your attention so you can report back any potential problems the security improvements may bring to the operation of the website.
</p>
<p>

Any problems, let me know.
</p>
<p></span></p>

Obviously this breaks the quote (the actual text doesn't contact within a box) and doesn't validate.

sanduhrs’s picture

On a fresh Drupal 4.7.4 install with patched quote.module I get the following result:

<div class="comment">
<h3 class="title"><a href="/drupal474/comment/reply/384#comment-" class="active">admin wrote:Port Talbot Chat</a></h3><span class="new">neu</span>    <div class="submitted">Verfasst von <a href="/drupal474/user/1" title="Benutzerprofil anzeigen.">admin</a> am Mon, 2006-10-23 10:48.</div>
<div class="content"><p><span class="quote-msg"><span class="quote-author">admin wrote:</span>Port Talbot Chat has been updated today on various parts to counteract potential security exploits.</span></p>
<p>There is nothing to be alarmed with here its just that a site admin has to keep up with the latest security exploit issues or run the risk of hackers gaining access to key parts of the website. This is a preventive action only but i bring this to your attention so you can report back any potential problems the security improvements may bring to the operation of the website.</p>
<p>Any problems, let me know.</p>
</div>

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?

Zen’s picture

Priority: Normal » Minor
Status: Needs work » Active

Are you guys sure that you are setting the quote filter *before* the line break filter? That is the recommended method.

Please confirm.

Thanks,
-K

Wuk’s picture

StatusFileSize
new769 bytes

I'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.

Wuk’s picture

It doesn't work for quote inside quote.

Zen’s picture

Status: Active » Closed (won't fix)

I 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