• I am currently importing my blog to WordPress using this plugin. Most of the 44,000 posts are properly imported with one issue. Any <!--more--> tags in the post content (which is used by Blogger and WordPress to denote the “Read more” cutoff. See: https://en.support.wordpress.com/more-tag/ ) is stripped from every imported post.

    Since 38,098 out of my 44,598 blogger posts use this tag, I don’t want to re-add these manually.

    This issue is seemingly caused by the following line in importer.php:

    178: 'post_content' => strip_tags($post->content, '<' . implode('><', $good_tags) . '>'),

    The strip_tags method also strips html comment tags such as the more tag. This is hardcoded and can’t be adjusted by providing it in the $good_tags array.

    As a temporary workaround I’ve removed the strip_tags from the plugin in my WordPress environment for now, inserting the Blogger content as-is.

    • This topic was modified 6 years, 2 months ago by LeonLuc.
    • This topic was modified 6 years, 2 months ago by LeonLuc.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author pipdig

    (@pipdig)

    Hi @gameleon,

    There may be a workaround we can try for this. For example by converting the more tags before running the content through strip_tags, then converting it back again afterwards. We will most likely include this in the next update when back in the office in January.

    Is your post content working ok after completing the import without strip_tags active? Or would you like to run the import again after we have created the workaround?

    Phil

    Thread Starter LeonLuc

    (@gameleon)

    Post content imported without the strip_tags seems to work fine overall (the blog never used really fancy/depecrated HTML, except for a few center tags in some of the really old posts).

    I do have to run the importer again in any case due to about 25% of the posts already having been imported when noticing the issue. So might as well do it after the workaround has been implemented in an update.

    (On a side note: Two tags that users might want to keep but are missing from the $good_tags array are span and center. span is still heavily used and while center is deprecated, some older blog posts might still have it in their content)

    • This reply was modified 6 years, 2 months ago by LeonLuc.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘More tag (among others) stripped’ is closed to new replies.