Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to manual/static Metatag entry from within the Integrated Metatags-page (admin/content/int_meta) but not in English but in Swedish. Which means including characters like ä, å or ö. The problem is that these special characters don't show up in the html-code in the metatag as I am expecting them to, but instead come out as &
auml; and &
aring; and &
ouml; which is not desired.
Is this a bug or is there something wrong going on my site?
Comments
Comment #1
apadernoHow do you expect them to show up in the HTML code?
Comment #2
Docc CreditAttribution: Docc commentedSame problem here.
for example: 'link popularity'
comes out like:
&
#039;link popularity&
#039;how about not converting to html characters :)
Comment #3
apadernoThe OP was not clear because the text contained HTML entities, which were rendered to the equivalent characters. I edited the posts to show the HTML entities as plain text.
To show a HTML entity in a issue report without it is converted, remember to insert it as <code>&</code>aring;, or <code>&</code>#039;.
Comment #4
fractile81 CreditAttribution: fractile81 commentedAt the very least, I have to escape the double-quote. I'll have to look myself, but can you find any documentation that supports not encoding such values?
Comment #5
apadernoOn the W3C website, the value passed for the content attribute is reported to be CDATA (http://www.w3.org/TR/html4/struct/global.html#edef-META), which means that:
I would think that is exactly the opposite of what suggested: the browser should replace the character entities before to use the meta tags.
Comment #6
fractile81 CreditAttribution: fractile81 commented@KiamLaLuno: so, to just make sure I'm reading things right, the character entities I'm doing for ", ', etc. should be totally valid. Correct?
For those that noticed this being a problem, how are you using the tags? Do you have an example of how this is actually breaking something (e.g. Google search results)?
Comment #7
apaderno@fractile81: You are understanding correctly.
It would be interesting to know how the meta tags set with the module are used. Any browser should be able to correctly show the meta tags, even if they contain entities.
To notice that the link I reported refers to HTML 4.0, and it is still valid for XHTML too. I would expect that any browser is able to correctly handle the meta tags, by now.
Comment #8
apadernoI am closing this issue, which is for a not supported Drupal version.