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

Meta description and keywords transform to html entities for non latin/cyrilic characters in category and product pages #10682

Closed
fouli86 opened this issue Aug 28, 2017 · 10 comments
Assignees
Labels
bug report Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@fouli86
Copy link

fouli86 commented Aug 28, 2017

When setting up meta keywords and description in the categories and in every product, all non latin characters transform to html entities, but not the title.

Preconditions

  1. Magento CE 2.1.8
  2. PHP 7.0.22
  3. Server version: MySQL 5.6.35
  4. el_GR language pack or any other non latin language

Steps to reproduce

Choose and enable a non latin language pack, ie Greek

  1. setup the meta keywords and description for a category and a product
  2. view page source

Expected result

All keywords appear as they should and category pages are "read" by google

Actual result

All non latin words are html entities

I have double checked the data table entries, everything looks as it should.

Note: The meta title is shown correctly, but also everything works fine on the homepage.

@korostii
Copy link
Contributor

For reference: this bug has been reported numerous times before.
Please see the following issues, for example: #5299, #4861, #2295
Still not fixed, it seems.

@magento-engcom-team magento-engcom-team added G1 Passed bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed and removed G1 Passed labels Sep 5, 2017
@magento-engcom-team
Copy link
Contributor

@fouli86, thank you for your report.
We were not able to reproduce this issue by following the steps you provided.
Please provide more details regarding your environment, or try to reproduce this
issue on a clean installation.

@fouli86
Copy link
Author

fouli86 commented Sep 15, 2017

Hello,
Database Server:
Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.6.35 - MySQL Community Server (GPL)
Protocol version: 10
Server charset: UTF-8 Unicode (utf8)

Web Server:
cpsrvd 11.64.0.39
Database client version: libmysql - 5.1.73
PHP extension: mysqli, curl, mbstring
PHP version: 5.6.30

I am using the language pack found here
I can't think of other details to provide you. Please do ask me for anything more specific. I haven't got the time yet to upgrade to the 2.1.9 version, in order to check if the problem still exists. I can send you my url in a private message or something, so that you can all better understand the issue.

Thanks in advance

@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Sep 18, 2017

@fouli86, may you, please, describe "expected result" more clear

@fouli86
Copy link
Author

fouli86 commented Sep 20, 2017

Sure! Let me be more clear with the following print screens:
Here is the Search Engine Optimization of a category on the backend
image

The expected result would be:
image

But....the actual page source is:
image

All words written in Greek are HTML entities, but note that the title is shown correctly (in greek characters). I have also noticed that whenever a category has no keywords and description, it uses correctly the keywords of my homepage.

I'm afraid I can't be more clear, but I really appreciate your help.

Thank you

@hostep
Copy link
Contributor

hostep commented Sep 26, 2017

@orlangur: because it causes the html to be larger in filesize then if the characters are outputted just as is, in utf-8 format.

In case anyone is interested, the entity encoding happens on this line:
https://github.com/magento/magento2/blob/4b56264/lib/internal/Magento/Framework/View/Page/Config.php#L229

I think the call to htmlentities should get removed here, it's not the task of this class to already start encoding text. If there needs to be some encoding/escaping it should happen when outputting the html, so in a Block or in a phtml file.

@magento-engcom-team magento-engcom-team added 2.2.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Oct 11, 2017
okorshenko pushed a commit that referenced this issue Nov 1, 2017
… html entities #11829

 - Merge Pull Request #11829 from dverkade/magento2:patch-20
 - Merged commits:
   1. 6311331
@magento-team
Copy link
Contributor

Internal ticket to track issue progress: MAGETWO-83024

@magento-team
Copy link
Contributor

Hi @fouli86. Thank you for your report.
The issue has been fixed in #12955 by @dverkade in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 3, 2018
magento-team pushed a commit that referenced this issue Jan 3, 2018
… and keywords transform to html entities #12955

 - Merge Pull Request #12955 from dverkade/magento2:2.3-Meta-description-and-keywords-transform-to-html-entities
 - Merged commits:
   1. c49c52a
magento-team pushed a commit that referenced this issue Jan 3, 2018
@magento-team
Copy link
Contributor

Hi @fouli86. Thank you for your report.
The issue has been fixed in #12956 by @dverkade in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Jan 10, 2018
magento-team pushed a commit that referenced this issue Jan 10, 2018
… and keywords transform to html entities #12956

 - Merge Pull Request #12956 from dverkade/magento2:2.1-Meta-description-and-keywords-transform-to-html-entities
 - Merged commits:
   1. 85db3a0
   2. 66d4d4e
magento-team pushed a commit that referenced this issue Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

9 participants