Support » Fixing WordPress » importing CSV with HTML

  • Hello,

    I have a strange situation. This might not be WP related, so my apologies in advance.

    I am trying to import a CSV into WP, which is simple enough, however, all of the text in the CSV is HTML. Is there anyway to remove all the HTML, either before importing or just have WP actually process the HTML?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Okay, I think I asked the wrong question actually.

    Using WP Ultimate CSV Importer, after selecting the CSV file, and am asked to map the fields, the content displays fairly well without the code. However, some punctuation is lost for whatever reason.

    After importing, however, all the posts are exactly as they were in the CVS with all the cumbersome code.

    Any ideas anyone?

    maybe this will help:

    I am using Ultimate WP CSV Importer and I am wondering how the file is being processed.

    The content in the CSV file contains HTML and so there are no linebreaks. For example:

    ☀pure poetry, poor pedantry—<div>it's all in the name:</div><div><br></div><div>a poor poet's (a)pathetic,</div><div>but the punk is the pain—</div>

    (I’m working on building a portfolio of poetry and the like.)

    so you can see where the linebreaks should be from the code, but importing is a strange phenomenon. In the preview where I can choose how to map the CSV’s fields, the linkbreaks appear properly, but certain symbols and punctuation do not appear. It looks like this:

    ?pure poetry, poor pedantry�
    it’s all in the name:

    a poor poet’s (a)pathetic,
    but the punk is the pain

    so, it’s good that the linebreaks are preserved but, losing the “—” is not going to work.

    In anycase, none of that seems to matter, as when I actually import the CSV file, all the posts are just unprocessed HTML, exactly as it is in the CSV file.

    So I’m thinking I either need to remove the HTML from the CSV file or there is a way to process the HTML and preserve the content. In the first case, I am not sure how to do this and simultaneously preserve all the linebreaks. As for WP reading the HTML in the CSV file—I’m clueless.

    Any help would be greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘importing CSV with HTML’ is closed to new replies.