sybrew/the-seo-framework

Quotation marks cause truncating issues in description fields

Closed this issue · 2 comments

Scias commented

Describe the bug
If a description field generated from the excerpt starts with a letter followed by a quotation mark (single ' or double ") (very common in french, examples : L'école, l'association...), then the letter and the quote mark itself won't show in the description field. It's not just a visual issue as the generated html meta tags are also affected.
If there's 2 or more letters before the mark, then the issue doesn't happen.
If the affected words are not at the start of the field, it doesn't happen.
The title field doesn't seem to have this issue.

EDIT: after further testing I noticed it also cuts content after a word that ends in quotation mark + letter (such as something's) - see last screenshot for details

How to reproduce the bug
Steps to reproduce the behavior:

  1. Make a post and write an excerpt starting with : L'something
  2. Check the generated description field, it'll show : something

Expected behavior
It should not cut or truncate anything and generate : L'something

Screenshots
Excerpt field :
seobug1

Generated description :
seobug2

Meta tag :
seobug3

Another example showing cuts at the start and the end :
seobug4

Additional context
Wordpress 6.2
PHP 8.0
Disabled all plugins except SEO Framework

sybrew commented

Thanks for the detailed bug report! I confirmed it.

Now, a massive headache awaits me.

sybrew commented

Fixed in 3fe91da.

image