javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Not all characters are properly matched if used as a keyword

Open jcomack opened this issue 9 years ago • 3 comments

What did you expect to happen?

When adding special characters as my keyword, such as <,> etc., I expect them to be matched in the Snippet Editor.

Oddly enough this does work with .

What happened instead?

The keyword is not being emphasised in the Snippet Preview.

How can we reproduce this behavior?

Make a new post and add a title and some content containing a > or < character. Set your keyword to something such as >. Check the Snippet Preview's output.

Technical info

  • WordPress version: 4.5.2
  • Yoast SEO version: Latest trunk (or 3.3 beta 3 release)

jcomack avatar Jun 07 '16 10:06 jcomack

This issue still exists (at least partially) in Yoast SEO 4.9. Compare: edit_post_ _local_wordpress_develop_ _wordpress

edit_post_ _local_wordpress_develop_ _wordpress

These characters should be displayed because Google shows them too.

thulshof avatar Jul 06 '17 07:07 thulshof

In Yoast 9.7 I can still confirm this issue. Single characters such as < or ^ seem to create a loop for the keyword analyzer (the spinning wheel shows and nothing happens). Using the character yields no troubles though.

@moorscode mind moving this to the YoastSEO.js repo?

Djennez avatar Mar 01 '19 08:03 Djennez

+1 for https://wordpress.org/support/topic/interpunction-in-keywords/

mmikhan avatar Jan 28 '21 11:01 mmikhan