occasionally, people post issue followups that leave stray html tags open. for example:

http://drupal.org/node/65319

even posting a followup that tries to close the open strong tags doesn't help, due to some div / markup mojo i don't fully understand. i've recreated the problem on a local test site, and nothing i do closes the open tags. i've seen this with strong, pre, em, etc, etc.

i mentioned this on #drupal, and drumm said "there are input format filters that close tags".

he was talking about:
http://drupal.org/project/htmlcorrector

even though no one's touched it in over a year, and it's never been branched for 4.7, it appears to work just fine on my local test sites running head and 4.7. i'm not much of a filter expert, so my brief review of the code wasn't all that helpful, but it seems reasonable. it definitely solves the problem. ;)

would y'all consider enabling this on d.o? it was written by steven, so i'm assuming it's safe, happy, etc.

thanks,
-derek

Comments

dww’s picture

in email, steven mentioned:

Well, we need to test its effect. Also, I've been thinking of seeing how easy it would be to integrate it into the XSS filter in core, because it already parses tags. We could add a simplified version of the HTML corrector which simply enforces proper nesting.

Plus, the main problem with issues is that they are impossible to edit. This causes more problems than just unclosed tags, such as people using <pre> with really wide content, rather than codefilter's <code>. The real solution is to add an UI editing of follow ups to the project.module, because no amount of filtering is going to remove all editing problems that users can cause.

to which, i replied:

agreed. however:

a) we really just [sic] need to port project to use comments instead of the home-brewed follow-ups. i'm tired of re-solving all the problems in project that stem from the project-specific comment code.

b) that's not something i'll be able to do anytime soon (though it's high on my list).

c) htmlcorrector exists now and solves at least this particular problem. ;)

but, yeah, point well taken.

just wanted to record this discussion here in case anyone else is thinking the same things...

dww’s picture

Project: Drupal.org site moderators » Drupal.org infrastructure
Component: web site » Drupal.org module
Status: Active » Closed (fixed)

i just noticed that someone (presumably steven) finally turned this on on d.o, but never closed this issue. don't know who or when, but at least the issue queues aren't so fubar anymore when people are sloppy with tags in their follow-ups. yay.

Project: Drupal.org infrastructure » Drupal.org customizations
Component: Drupal.org module » Miscellaneous