Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: unicode characters in CMS entry titles after migration from Wordpress using Feed me #16460

Open
danfathom opened this issue Jan 20, 2025 · 5 comments

Comments

@danfathom
Copy link

What happened?

Description

I've used Feed me to transfer all blogs over to Craft 4 from a Wordpress site (this was a while ago). This has meant that unicode character are showing in the titles. I'm able to remove these on the front-end of the site by using the {{entry.title|raw}} filte, however I am unable to remove these in the title field of the CMS.

I've tried adding {{title|raw}} into the title field in the CMS but this doesn't seem to work.

Image

Do you have any ideas if this is possible?

Thanks!

Craft CMS version

Craft Solo 4.13.10

PHP version

8.2.27

Operating system and version

Linux 5.14.0-427.13.1.el9_4.x86_64

Database type and version

MySQL 8.0.40

Image driver and version

GD 8.2.27

Installed plugins and versions

Agent | 5.0.0
CKEditor | 3.8.3
Feed Me | 5.4.0
Freeform | 5.1.14
Hyper | 1.1.27
SEOmatic | 4.0.48
Sprout Redirects | 4.47.2
Super Table | 3.0.13

@danfathom danfathom changed the title [4.x]: [4.x]: unicode characters in CMS entry titles after migration from Wordpress using Feed me Jan 20, 2025
@brandonkelly
Copy link
Member

Can you give me an example of a title that contains Unicode characters?

@danfathom
Copy link
Author

Of course, i've attached a screenshot below of one of the titles:

Image

Thanks!

@brandonkelly
Copy link
Member

Is that ’ entity is encoded like that in the feed?

@danfathom
Copy link
Author

No it's it's not in the JSON that I imported. My issue is the |raw filter works on the front end, but not when adding the manual title in the CMS like i've added in the screenshot in my opening message (if that takes sense).

Thanks,
Dan

@brandonkelly
Copy link
Member

brandonkelly commented Jan 21, 2025

Setting the title format to {{ title|raw }} is the same as not having a title format to begin with; you’re just telling it to set the title to the title, exactly.

(And I would not advise using title|raw in your front end templates. That introduces a major XSS vulnerability.)

Can you post the exact JSON data that was imported? Or send it to [email protected]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants