Fix meta description UTF-8 character count#655
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #655 +/- ##
=============================================
+ Coverage 74.57% 74.68% +0.10%
Complexity 1754 1754
=============================================
Files 85 85
Lines 7548 7549 +1
=============================================
+ Hits 5629 5638 +9
+ Misses 1919 1911 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Changed - Use explicit UTF-8 encoding for generated meta description character counts. Co-authored-by: yusufhay <yusufmudagal@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org>
What?
Updates meta description generation to pass
UTF-8explicitly when calculating the generated description character count.Why?
The generated meta description response includes a
character_countvalue. Other multibyte length checks in the plugin already passUTF-8explicitly, and this keeps meta description output consistent for multilingual content.How?
Changes the
mb_strlen()call used for the generated meta description output from relying on PHP internal encoding to explicitly usingUTF-8.Use of AI Tools
AI assistance: Yes
Tool(s): Codex / ChatGPT
Model(s): GPT-5
Used for: Scanning the codebase for small correctness issues and drafting the minimal change. I reviewed the change and PR description before submitting.
Testing Instructions
character_countreflects the generated UTF-8 text.Screenshots or screencast
Not applicable. This PR does not change the UI.
Changelog Entry