WordPress.org

Ready to get started?Download WordPress

Forums

HTML Import 2
Error when importing nested p in td (3 posts)

  1. ffwebdesigner
    Member
    Posted 3 months ago #

    Hi Stephanie,

    i found another bug which i unfortunately couldn't fix so far:

    When importing code like

    <td><p>text</p></td>

    with proper surrounding table tags and option "clean up bad html", p and td allowed, the imported result stays empty. When I remove the <p> tag, everything works fine.

    https://wordpress.org/plugins/import-html-pages/

  2. Stephanie Leary
    Member
    Plugin Author

    Posted 3 months ago #

    Does the plugin strip the text entirely, or just the P tag? There's a a longstanding bug in WordPress's handling of paragraphs within table cells.

  3. ffwebdesigner
    Member
    Posted 3 months ago #

    i fixed it by myself using custom fields with td class xy to get the whole html. i also changed the code a little

    $customfields[$fieldname] = $this->clean_html($content[0]->asXML(), $options['allow_tags'], $options['allow_attributes']);

    before, the plugin did not only strip the p tags, but didn't retrieve any html content.

Reply

You must log in to post.

About this Plugin

About this Topic