Closed (fixed)
Project:
Drupal core
Version:
4.6.5
Component:
filter.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2005 at 23:03 UTC
Updated:
14 Jan 2006 at 19:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
ñull commentedSorry. The "them" I added to "Allowed HTML tags" were
and
.
Comment #2
ñull commentedI added these to "Allowed HTML tags":
<br> </br>Comment #3
alexanderpas commentedi noticed that is is inpossible to add any self-closing xhtml codes in the proper way so it keeps XHTML Strict Compliance
Comment #4
frjo commentedI have noticed this also. The HTML filter will convert
in to this
breaking XHTML 1.0 Strict Compliance.
Comment #5
chx commented4.6.4 and on has filter_xss which takes special care to keep the XHTML slash.
Comment #6
frjo commentedI missed to change the version info, sorry.
I have this problem with 4.6.4, and setting line 1097 in filter.module,v 1.57.2.10
to this
doesn't help.
(I believe $attr should be $attrlist since $attr is never set in function _filter_xss_split and should there not be a space before the closing slash?)
Comment #7
frjo commentedProblem persist with Drupal 4.6.5.
Comment #8
tclineks commented$attr to $attrlist fixes this.
patch attached (patched against 4.6.5).
Comment #9
frjo commentedThis works for me now, I must have done something wrong when I did the testing in my last post.
I suggest we also add a space before the closing slash, that is what my patch adds.
Comment #10
Steven commentedI committed a slightly tweaked patch: the code would always add a space after the tag name, even if there were no attributes (e.g.
<tag >) and it would not recognize the XHTML slash without the (optional) leading space (e.g.<tag/>).Thanks.
Comment #11
tclineks commentedLooks like the extra space will still be there with that commit Steven.
http://drupal.org/node/27230 is a patch for this -- your conditional is cleaner.
Comment #12
Steven commentedErr, how? This is the code:
$attrlist only contains non-empty strings, without leading or trailing spaces. And $attr2 only gets prefixed with a space if it is non-empty. So, there can only be a space between $elem and $attr2, if there are attributes.
As far as the leading space for the XHTML slash, that is recommended by W3C.
Comment #13
tclineks commentedthat's the code: last line still have space between $elem and $attr
http://cvs.drupal.org/viewcvs/drupal/drupal/modules/filter.module?r1=1.9...
Comment #14
tclineks commentedHas*
Sorry about not being very clear there.
Comment #15
tclineks commentedWhoops!
http://cvs.drupal.org/viewcvs/drupal/drupal/modules/filter.module?r1=1.9...
doesn't show the change on that line but it's there, fixed indeed.
Comment #16
(not verified) commented