The HTML Corrector filter is incorrectly interpreting markup and adding a </br/> tag into my content -- note that the tag is malformed with a slash before and after the BR. Please see this page on my test site for an example. Around line 223 you will see this HTML:
<p><strong>St. Stephen’s Lutheran Church </strong>is located at <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=St.+Stephen's+Lutheran+Church,+230+N.+Evergreen+Ave.,+Woodbury,+NJ&sll=37.0625,-95.677068&sspn=49.444078,114.257812&ie=UTF8&z=16&iwloc=A" class="elf-external elf-icon">230 N. Evergreen Ave, Woodbury, <span class="caps">NJ</span></a>.<br/>
</br/></p>
In contrast, the original markup looks like this:
<p><strong>St. Stephen's Lutheran Church </strong>is located at <a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=St.+Stephen's+Lutheran+Church,+230+N.+Evergreen+Ave.,+Woodbury,+NJ&sll=37.0625,-95.677068&sspn=49.444078,114.257812&ie=UTF8&z=16&iwloc=A">230 N. Evergreen Ave, Woodbury, NJ</a>.<br />
</p>
The HTML corrector is replacing the non-breaking space with an incorrectly-formed BR tag. I have verified this by disabling the filter and re-checking the page. My expected behavior is that the non-breaking space is left intact and not replaced with a bad BR tag.
Comments
Comment #1
elally commented- Bump -
Comment #2
Tiaan commentedAs a workaround, you can use the following: I noticed that Drupal only does this if your original post's text contains "<br/>", but the problem disappears if you change this to "<br />" (that is, insert a space after "br" and before the slash). It still seems like a bug though.
Comment #3
elally commentedI tried the workaround but it didn't work for me. Hoping for a bug fix.
Comment #4
orgnsm commented- same problem here, subscribing -
Comment #5
orgnsm commentedmy work-around is: turn off html corrector. it's ironic that the only errors in my mark-up are generated by this
Comment #6
vectoroc commentedtry this
comment on the changed line is not correct in general but it fixes the problem
Comment #8
pvasili commented<img src="#"/>replaced on<img src="#" />:-(Comment #9
vectoroc commentedCorrected patch
Comment #11
andypostD7 and latter are not affected
Comment #12
andypost#9: filter_htmlcorrect_trailing_slashes-787530-10.patch queued for re-testing.
Comment #13
vectoroc commentedthx
Comment #14
ohnobinki commentedI tested this patch on drupal-6.22 and it fixes the same issue for me.
I can reproduce the issue by making sure that HTML Corrector is enabled and HTML Filter is disabled. (It seems that HTML Filter must be rewriting
<br/>into<br />?)Comment #15
thedavidmeister commented#9: filter_htmlcorrect_trailing_slashes-787530-10.patch queued for re-testing.