getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 227 forks source link

Apostrophe in description metadata is not displayed correctly #1940

Open jstebenne opened 4 years ago

jstebenne commented 4 years ago

When specifying text with an apostrophe in a metadata description, the text displayed on the web page does not parse correctly.

Code:

metadata:
    description: 'C''est un texte de test'

Expected result:

<meta name="description" content="C'est un texte de test">

Actual result:

<meta name="description" content="C&amp;#039;est un texte de test">

I also tried by using double quotes to surround the text, but it doesn't change anything.

I am running Grav v1.6.23

rhukster commented 3 years ago

Appears that there's encoding happening there that shouldnt

mahagr commented 3 years ago

Meta property should probably have attribute escaping, not html. Which theme are you using?

jstebenne commented 3 years ago

@mahagr I believe it was this theme: https://rockettheme.com/grav/themes/isotope

blizam commented 1 year ago

Any update on this issue? Would this be a Gantry/Nucleus thing that needs to be addressed? Looks to me like it is using the escape attribute:

/gantry5/engines/nucleus/templates/page_head.html

<meta name="{{ key|e }}" content="{{ value|e }}" />

presently it's rendering apostrophe's like: &apos;

rhukster commented 1 year ago

@blizam your example is coming from a twig file in Gantry5 not from Grav admin plugin. This is not the repo for this issue

blizam commented 1 year ago

fair enough, I opened https://github.com/gantry/gantry5/issues/3160