Hello,
when one is searching for strings in admin/locale, HTML entities within the message strings are possibly cut off. (Text cut occurs within an entitiy, e.g. there's """ in the string and after the cut the string which is displayed ends with "&quo" e.g.)
This leads to invalid (X)HTML, which I just noticed using a theme which not only uses XHTML, but also sends "application/xhtml+xml" as MIME-Type for the document. (Therefore a browser capable of XHTML will stop displaying the site if there is an obvious syntax error.)
Regards,
Milan
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | locale_15121.patch | 1.25 KB | wulff |
Comments
Comment #1
jagdfalke commentedOk, after having had this in the back of my head for some time, I thought that the simple fix would be to cut the string first, and apply htmlspecialchars then (since this function removes any entities, tags etc which would - when cut off - generate invalid markup, the problems is solved.)
To do this, change lines 1053/1054 of includes/locale.inc, which look like this:
to this:
(the line numbers are valid for my Drupal 4.5.1.)
Regards,
Milan
Comment #2
killes@www.drop.org commentedIf you set somethig to "patch" please include a patch file. Moving the issue to Drupal.
Comment #3
wulff commentedStill exists in current HEAD.
Comment #4
wulff commentedPatch for jagdfalke's fix attached.
Comment #5
Steven commentedFixed in HEAD in a different way.
Comment #6
(not verified) commentedComment #7
(not verified) commentedComment #8
(not verified) commentedComment #9
(not verified) commentedComment #10
(not verified) commented