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&#8217;s Lutheran Church </strong>is located at <a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=St.+Stephen's+Lutheran+Church,+230+N.+Evergreen+Ave.,+Woodbury,+NJ&amp;sll=37.0625,-95.677068&amp;sspn=49.444078,114.257812&amp;ie=UTF8&amp;z=16&amp;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&amp;hl=en&amp;geocode=&amp;q=St.+Stephen's+Lutheran+Church,+230+N.+Evergreen+Ave.,+Woodbury,+NJ&amp;sll=37.0625,-95.677068&amp;sspn=49.444078,114.257812&amp;ie=UTF8&amp;z=16&amp;iwloc=A">230 N. Evergreen Ave, Woodbury, NJ</a>.<br />
            &nbsp;</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

elally’s picture

- Bump -

Tiaan’s picture

As 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.

elally’s picture

I tried the workaround but it didn't work for me. Hoping for a bug fix.

orgnsm’s picture

- same problem here, subscribing -

orgnsm’s picture

my work-around is: turn off html corrector. it's ironic that the only errors in my mark-up are generated by this

vectoroc’s picture

Status: Needs work » Needs review
StatusFileSize
new524 bytes

try this
comment on the changed line is not correct in general but it fixes the problem

Status: Active » Needs work

The last submitted patch, filter_htmlcorrect_trailing_slashes.patch, failed testing.

pvasili’s picture

Status: Needs review » Needs work

<img src="#"/> replaced on <img src="#" /> :-(

vectoroc’s picture

Status: Needs work » Needs review
StatusFileSize
new505 bytes

Corrected patch

Status: Needs review » Needs work

The last submitted patch, filter_htmlcorrect_trailing_slashes-787530-10.patch, failed testing.

andypost’s picture

Version: 6.16 » 6.x-dev
Status: Needs work » Needs review

D7 and latter are not affected

andypost’s picture

vectoroc’s picture

thx

ohnobinki’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Invalid XHTML

I 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 />?)

thedavidmeister’s picture

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: filter_htmlcorrect_trailing_slashes-787530-10.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.