No, I'm *giving* them the opportunity to configure what should be stripped and what should be kept. The htmlcleaner strips all other attributes in a hardcoded way if you have some CSS class set on a span element, i.e. the list of allowed attributes is ignored when you have CSS class set on a span. I want to keep those other attributes, if they are configured as allowed attributes. It seems more consistent to me to handle spans in a similar way as other elements are handled.
On Tue, Sep 22, 2009 at 12:50 PM, Rita Bijlsma <[email protected]>wrote: > > > On Tue, Sep 22, 2009 at 12:27 PM, Dennis Dam <[email protected]> wrote: > >> Hi all, >> >> I'm crossposting this mail to the CMS 6 and CMS 7 lists, because this is >> something that concerns both CMSes. >> >> I noticed that the HTML cleaner does not handle <span> elements correctly; >> or at least: I expected it to work differently. >> >> I'm using the language picker Xinha plugin in CMS 7. This plugin inserts a >> <span> element around selected text and sets two attributes: a class >> attribute with the value "haslang" and a lang attribute with the 2-letter >> code for the language (i.e. "en"). So the resulting html could be: >> >> <span lang="nl" class="haslang">Goedemiddag</span> is a Dutch word. >> >> When saving the document, the html cleaner component strips the lang >> attribute. In fact, it strips all other attributes when it encounters a >> class attribute, except the class attribute itself. >> >> I want to fix this code in the HTML cleaner, so the list of allowed >> attributes is used for the <span> element, instead of ignoring that list >> when a class attribute is encountered. I'm wondering though, if that will >> break existing projects (using either Hippo CMS 6 or CMS 7) ?? Anyone? If >> nobody objects, I will fix the part in the HTML cleaner that strips all >> other attributes. >> >> > In CMS 7 you can configure what elements and attributes should not be > stripped. > I remember that everthing mentioned in the list is considered allowed. So > if you change the behavior of the html cleaner all such configurations would > have a new meaning. I did not see a method to mark an attribute as having to > be stripped, so it may be that in CMS 7 you would be robbing users of the > possibility to configure what should be stripped, but I'm not sure about > that. > > Grt, > Rita > > >> regards, >> Dennis >> >> -- >> Hippo B.V. - Amsterdam >> Oosteinde 11, 1017 WT, Amsterdam, +31(0)20-5224466 >> >> Hippo USA Inc. - San Francisco >> 101 H Street, Suite Q, Petaluma CA, 94952-3329, +1 (707) 773-4646 >> ----------------------------------------------------------------- >> http://www.onehippo.com - [email protected] >> ----------------------------------------------------------------- >> >> >> _______________________________________________ >> Hippo-cms7-user mailing list and forums >> http://www.onehippo.org/cms7/support/community.html >> > > > _______________________________________________ > Hippo-cms7-user mailing list and forums > http://www.onehippo.org/cms7/support/community.html > -- Hippo B.V. - Amsterdam Oosteinde 11, 1017 WT, Amsterdam, +31(0)20-5224466 Hippo USA Inc. - San Francisco 101 H Street, Suite Q, Petaluma CA, 94952-3329, +1 (707) 773-4646 ----------------------------------------------------------------- http://www.onehippo.com - [email protected] ----------------------------------------------------------------- ******************************************** Hippocms-dev: Hippo CMS development public mailinglist Searchable archives can be found at: MarkMail: http://hippocms-dev.markmail.org Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
