Cleaner Gallery
[resolved] Invalid HTML (3 posts)

  1. Arno Welzel
    Posted 2 years ago #

    I just updated to version 1.1.0 and have invalid HTML again :-(

    If I check the output, I see there is a problem with its structure:

    <p><figcaption></figcaption><br />

    1) The <p> element starts within <figure> but closes afterwards!
    2) BR-elements are not allowed within <figure>

    The problem seems is the use of \n and \t in cleaner-gallery/inc/gallery.php - since the default WordPress wpautop filter replaces newlines in the output with or adds <p>...</p> if something looks like a paragraph.

    After I removed all "\n" and "\t", everything looks OK again.

    Please consider this for the next update. If you want to make the HTML look "nice" - ok, but take care not to create line breaks or empty lines which may create problems with wpautop


  2. Justin Tadlock
    WordPress God
    Plugin Author

    Posted 2 years ago #

    This plugin has always had line breaks added into it. That's nothing new.

    It sounds like you have a plugin or theme function that's doing something it shouldn't be doing. It's possible that one of them is switching some default content filters around (shortcodes are run *after* wpautop()).

  3. Arno Welzel
    Posted 2 years ago #

    Indeed - on fresh demo setup (http://arnowelzel.de/wpdemo/) it works fine.

    So I have to investigate. I really like WordPress... but these wpautop issues are really very annoying.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cleaner Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic