wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

Content flag not working when seo title or keywords contains special characters

Open julienmeyer opened this issue 12 years ago • 4 comments

When SEO title or keywords contains specials characters (é, è, ç, ...), the content flag is always "No". If I replace my seo title or keywords with the same words without special characters, it works fine.

julienmeyer avatar Jan 27 '14 10:01 julienmeyer

Deepening my research, I found the reason for this problem. I use the WPML plugin for managing languages. This plugin saves the special characters in the "html" format (é => é) (post content in database). But Yoast keywords are not "encoded" in database. The matching can therefore not be. This is not really a bug, but rather an improvement. I let you see if it can be useful or not.

julienmeyer avatar Jan 29 '14 08:01 julienmeyer

@julienmeyer Ah... thanks for researching this. What is the encoding of your blog ? If it is UTF-8 ? (which is the WP standard), then basically WPML are doing it wrong, they shouldn't use html entities for those characters as with the pages being encoded in UTF-8, the characters will display properly anyway. Also, entity escaping is something you should only do when displaying to the screen, not when saving to the database, so even if WPML would choose to still escape these characters to entities, the moment they are doing it is too early on and exposes websites to a very real risk of double escaping ( which leads to this: é). The basic rule is: "validate all input, escape all output" and they are by the sounds of it escaping input. Hope this helps when you inform WPML.

jrfnl avatar Jan 29 '14 09:01 jrfnl

@jrfnl Thanks. I'm agree with you. I posted a similar question on wpml forum and I'm waiting some ideas...

julienmeyer avatar Jan 29 '14 14:01 julienmeyer

@julienmeyer Is this solved now with the merge ? Is so, we should probably close this issue.

jrfnl avatar Mar 04 '14 01:03 jrfnl