Posted by mutualadvantage on September 24, 2009 at 10:19pm
6 followers
| Project: | Nodewords: D6 Meta Tags |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Using in conjunction with other modules I noticed that nodewords is not stripping certain tags and not displaying content correctly in the head element of some nodes.
The output on page in the html appears as <meta name="description" content="<p>Details are here</p>" />
For further info: http://drupal.org/node/587016
Comments
#1
I marked #587094: HTML entities cannot be used in the meta tags content as duplicate of this report.
#2
Very simple, contents are already escaped, then it gets double encoded with a call to check_plain()
#3
Is that the only change that needs to be done to the code?
#4
not quite...
http://php.net/html-entity-decode#93378
this patch works
#5
+
#6
The code has been changed, and committed in CVS.
Thanks for the report, and the patch.
#7
Rather than using
html_entity_decode(), the code should usedecode_entities(); it should also strip any HTML tags, which should not be present on the output meta tags.#8
I changed the code as reported in the previous comment, and committed the code in CVS.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
i'm using nodewords version 6x-1.11 and the problem still exist. when i key in description, for e.g., What's new, it show in the html source code as
What'snewi tried with the patch but not working.
[Edited by kiamlaluno to show the encoded entities]
#11
@xsean: That is perfectly normal. Entities are allowed in the meta tags content, and browsers should be prepared to handle them; this is what W3.org reports (to note that content is defined as CDATA).