Product import xml: Texts with html entities

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
heural
Posts: 85
Joined: 09 Jun 2022, 07:55

Product import xml: Texts with html entities

Post by heural » 15 May 2025, 12:55

Hi Aimeos-Team,

I exported products with version 2023.10.7 and try to importing in 2024.10.x-dev

The import finished successful but the texts for the products are as html entities. Is it a bug or is this not compatible for diff. versions?
Attachments
as html source code
as html source code
chrome-capture-2025-5-15 (1).png (34.33 KiB) Viewed 406272 times
chrome-capture-2025-5-15.png
chrome-capture-2025-5-15.png (33.04 KiB) Viewed 406273 times
Thanks a lot!

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Product import xml: Texts with html entities

Post by aimeos » 15 May 2025, 13:42

Are the HTML entities in the XML file or only after the import in the new system?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

heural
Posts: 85
Joined: 09 Jun 2022, 07:55

Re: Product import xml: Texts with html entities

Post by heural » 20 May 2025, 06:10

The entities are in the xml of the export:

Code: Select all

<text.content><![CDATA[&lt;ul&gt;&lt;li&gt; ...
Thanks a lot!

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Product import xml: Texts with html entities

Post by aimeos » 20 May 2025, 07:06

It's most likely due to the $enc->xml() calls here which escapes the "<" and ">" characters:
https://github.com/aimeos/ai-controller ... rd.php#L33

The best solution might be to transform the HTML entities back here:
https://github.com/aimeos/ai-controller ... rd.php#L77
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

heural
Posts: 85
Joined: 09 Jun 2022, 07:55

Re: Product import xml: Texts with html entities

Post by heural » 20 May 2025, 09:39

Ok, thank you.
I have replaced the entities in the xml with a editor now. I need this import only once.
Thanks a lot!

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Product import xml: Texts with html entities

Post by aimeos » 27 May 2025, 10:42

The content and attributes will be properly decoded in the 2025.10 release.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply