Closed (won't fix)
Project:
Drupal core
Version:
x.y.z
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2005 at 05:44 UTC
Updated:
7 Sep 2005 at 02:00 UTC
This patch extends the list of HTML tags that are allowed by the HTML filter by default. This is a feature that was requested in this thread:
http://drupal.org/node/30364#new
The list of tags allowed by this patch includes:
<a> <em> <strong> <cite> <blockquote> <pre> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6> <ins> <del>
I didn't include <h1> because that is used by the title more often than not. Discussion on the list of tags is welcome, but I agree with the poster that mentioned this that there could be more without any danger to site or theme.
| Comment | File | Size | Author |
|---|---|---|---|
| filter_patch.txt | 994 bytes | robertdouglass |
Comments
Comment #1
sepeck commentedThere are a lot of themes that use h2 for the node title. I think we should exclude that from the list of defaults. Otherwise, I don't see a problem.
Comment #2
dries commentedNot going to commit this patch. It should be easy enough to change this as an administrator.
Comment #3
robertdouglass commentedI won't argue at this point, though it is a lot easier to delete unwanted tags than to type in desired tags. Seems like a missed opportunity at a small usability gain.
Comment #4
neuraxon77 commentedThanks for trying robert. :)
I'd point out that all of these additions, with the exception of
<del>are permitted on drupal.org.It would be just as easy for administrators to revoke them should any problems arise while gaining a little usability. I do however understand Dries concern in that existing content using any tags that become revoked will not appear for that content. Personally, likely revoked tags would really only be sepeck's objection to h2 and possibly the other headers.
Comment #5
Dave Cohen commentedOn my own sites I've allowed <p> and <div>. Is there some reason these should not be allowed?
Forgive me if this is not the appropriate place for this question.
Comment #6
Jaza commentedI have allowed these additional tags on my site, and I think that they should be added to this patch:
<abbr> <sub> <sup>I also allow p and br tags, but I don't think these should be in the default list, because of the popularity of the line break converter filter in core. I also don't think that div or span tags should be allowed by default, as they give the average user too much control over the style and layout of the content. And as for h2 tags, I agree with sepeck that this would conflict with too many themes - users that want this can add it manually.
This is a very useful patch, IMO, and I for one would like to see it committed. The current default list is too restrictive, and I suspect that many site admins don't bother to add to it, much to the annoyance of the site's users.