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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | nodewords-587248.1.patch | 954 bytes | mikeytown2 |
| #2 | nodewords-587248.patch | 933 bytes | mikeytown2 |
Comments
Comment #1
avpadernoI marked #587094: HTML entities cannot be used in the meta tags content as duplicate of this report.
Comment #2
mikeytown2 commentedVery simple, contents are already escaped, then it gets double encoded with a call to check_plain()
Comment #3
avpadernoIs that the only change that needs to be done to the code?
Comment #4
mikeytown2 commentednot quite...
http://php.net/html-entity-decode#93378
this patch works
Comment #5
hass commented+
Comment #6
avpadernoThe code has been changed, and committed in CVS.
Thanks for the report, and the patch.
Comment #7
avpadernoRather 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.Comment #8
avpadernoI changed the code as reported in the previous comment, and committed the code in CVS.
Comment #10
xsean commentedi'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]
Comment #11
avpaderno@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).