I am scratching my head wondering why I get this output. I have disabled all input filters and yet I get a similar result.

I get this message in all pages with a list

warning: DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 7 in reptag_process.inc on line 276.

And I get this replacement tag behaviour

* test
* test
* test
* test
* test
* test
* test
* test

With an output of...

<li>test</li>
<li>test</li>
</ul>
<ul>
<li>test</li>
<li>test</li>
</ul>
<ul>
<li>test</li>

<li>test</li>
</ul>
<ul>
<li>test</li>
<li>test</li>
</ul>
CommentFileSizeAuthor
#1 stf_list.patch2.05 KBprofix898

Comments

profix898’s picture

Status: Active » Needs review
StatusFileSize
new2.05 KB

There is a bug in sft.tags which doesnt work with item lists longer than 2 items. The attached patch should solve this problem.

I'm still not sure why there is a validation error! Such errors are only displayed on node preview and should not appear on regular page views. You can easily disable preview validation under 'Expert - Setting' section on the reptag admin pages. However I'd like to understand why the stf.tags result is invalid html. The module generate html like this ...

    <p><ul>
      <li>test</li>
      <li>test</li>
      <li>test</li>
      <li>test</li>
    </ul></p>

... validating this piece against http://validator.w3.org/ results in

Error Line xyz: end tag for element "P" which is not open.

</ul></p>

The Validator found an end tag for the above element, but that element is not
currently open. This is often caused by a leftover end tag from an element that
was removed during editing, or by an implicitly closed element (if you have an
error related to an element being used where it is not allowed, this is almost
certainly the case). In the latter case this error will disappear as soon as
you fix the original problem.

Maybe I'm missing something and yes I'm no (x)html guru, but whats wrong with this piece?

Fajan’s picture

Version: 5.x-1.3 » 5.x-1.5

I just upgraded to v1.5 to keep up and the patch you gave me is no longer valid. I did it manually and I can confirm that the patch fixes the problem totally. I now no longer encounter any "warning: DOMDocument::loadHTML()" page errors anymore. Alas I am encountering another different problem altogether. Will submit a separate bug report for that. Thanks for all the help!

profix898’s picture

Status: Needs review » Fixed

Patch committed to Drupal-5 branch.

Anonymous’s picture

Status: Fixed » Closed (fixed)