Like title says. User has unclosed <i> tag in signature, and the rest of the page becomes italic. HTML-filter is enabled. Brand new 4.2.0 install.

Comments

Anonymous’s picture

Version: » master

When you put a "break drupal tag" into italics words, all the page comes italics too.

Boris Mann _Old Blogger.com Account_’s picture

This is not exactly a bug, but it's not exactly a feature either, is it?

Current functionality is that the Drupal break tag just breaks -- it doesn't look at any other tags, etc. Of course, if you have the HTML filter turned off, or you allow certain tags (such as , although things like unclosed lists would cause much more problems) you will get very nasty looking pages.

The HTML filter *and* the break/paging functionality are currently in very heavy development and these issues will be ironed out.

For now, this is essentially "by design". Your choice basically boils down to turning on HTML filtering, and then maybe enabling the bbcode module (which, since it's a filter, is also going to be re-vamped).

Anonymous’s picture

If enabled, optionally specify tags which should not be stripped. 'STYLE' attributes, 'ON*' attributes and unclosed tags are always stripped.

That's what the admin page for the HTML-filter says, so I did not expect unclosed tags to slip through, even if they are allowed. Must I filter out all tags to prevent users from messing up the pages?

Boris Mann _Old Blogger.com Account_’s picture

Hah. I notice that this bug report suffers from unclosed tags.

Hmmm...I never noticed that line in the admin. From my reading of the code, unclosed tags are *not* stripped. They are *definitely* not stripped if one tag appears before the break delimiter and one after.

For now, yes, you must filter all tags in order to prevent users from messing up pages.

Kjartan’s picture

Version: master »
Component: comment.module » filter.module
Category: bug » feature

Fixed the documentation of the filter, but making this a feature request as removing unclosed tags seems like a smart thing to do.

TDobes’s picture

Automatically closing tags is a feature provided by htmlcorrector.module (in contribs), which I recently upgraded to work with the latest filter system changes. When dealing with the entire message (with a break tag included), it won't auto-close tags opened BEFORE the break until AFTER the break. To me, this seems like the expected behavior.

jonbob’s picture

Title: Unclosed &lt;i&gt; tag not filtered » Automatically close mismatched tags

I would like something like HTMLCorrector to be available as a core option.

geodaniel’s picture

Version: » 6.x-dev

This would be nice to have - just look at the styling of this issue due to unclosed tags ;)

(or should it just be in contrib?)

moshe weitzman’s picture

Title: Automatically close mismatched tags » Automatically close mismatched tags - htmlcorrector in core
scor’s picture

Status: Active » Fixed

this is now part of Drupal 6.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.