Solved: Magento – Export/Import products with HTML tags

I was really surprised that Magento’s Import/Export feature would mess up my product descriptions. All the HTML tags got exported as special characters and when imported HTML code was shown as text in the product description area.

To overcome this issue where Magento exports your HTML as special characters (replaces <> and ” with &lt; &gt; and &quot;) you just simply replace them back 😉

1. Download the .csv file to your computer after the export you did in System -> Import/Export -> Dataflow profiles. You find the file in var/export if you didn’t change the export path.

2. Ah, almost forgot, to set up the export, you must use a custom symbol for “enclose values in” rather than quotes, because you will perform a search and replace to all the quotes later – I used | as I don’t have it anywhere in the texts.

magento export html description

3. Open the .csv in your favorite text editor (mine is Notepad++) and perform a search&replace. You will find a couple of thousand occurrences, I had 95 products and found about 17000 for each.

– search and replace &lt; for <
– search and replace &gt; for >
– search and replace &quot; for “

search and replace magento product export

Mind that you need to untick “Match whole word only” since otherwise you’d miss a bunch of them.

4. Go set up your import routine and make sure you use your correct symbol for “enclose values in”.

The product import for me at least seems to stall for a while, but after 5-10 minutes it has done it all.

Voila! Enjoy.

Post Author: Tom Pai