Re: [xwiki-devs] [xwiki-notifications] r15346 - in platform/core/trunk/xwiki-xml: . src/main/java/org/xwiki/xml/html src/main/java/org/xwiki/xml/html/filter src/main/java/org/xwiki/xml/internal/html src/main/java/org/xwiki/xml/internal/html/filter sr
Hi VIncent, On Mon, Jan 12, 2009 at 2:13 PM, Vincent Massol <[email protected]> wrote:
Hi Asiri,
This is good (the move to components for filters) except for one very important thing: now if some module implements some filter components using that interface they'll be used automagically by the HTMLCleaner. This makes the HTML Cleaner non safe with a non predictable behavior.
Imagine for ex that in the office importer you implement the CleaningFilter interface and expose the implementations as components. These filters will be used even when not doing office imports.
So +1 for components but you need a way to control which filters are used for a cleaning operation now.
I didn't think of this. For the moment I have changed the components.xml to inject only those filters we require for DefaultHTMLCleaner. But yes, we should have a mechanism to dynamically specify which filters we need to apply... Thanks. - Asiri
Thanks -Vincent
On Jan 12, 2009, at 12:38 AM, asiri (SVN) wrote:
Author: asiri Date: 2009-01-12 00:38:10 +0100 (Mon, 12 Jan 2009) New Revision: 15346
Added: platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/ filter/ platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/ filter/CleaningFilter.java platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/filter/ platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/filter/DocTypeCleaningFilter.java platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/filter/LineBreakCleaningFilter.java platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/filter/ListCleaningFilter.java Removed: platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/CleaningFilter.java platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/DocTypeCleaningFilter.java platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/ListCleaningFilter.java Modified: platform/core/trunk/xwiki-xml/pom.xml platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/ html/DefaultHTMLCleaner.java platform/core/trunk/xwiki-xml/src/main/resources/META-INF/plexus/ components.xml platform/core/trunk/xwiki-xml/src/test/java/org/xwiki/xml/ XMLUtilsTest.java platform/core/trunk/xwiki-xml/src/test/java/org/xwiki/xml/internal/ html/DefaultHTMLCleanerTest.java Log: XWIKI-3101: Replace invalid xhtml <br/> elements with <div class="wikimodel-emptyline"/> in DefaultHTMLCleaner XWIKI-3094: Errornous rendering of xhtml content with <br/
[newline]<p> sequence
* LineBreakCleaningFilter implements the above functionality. * Adding LineBreakCleaningFilter caused a fan-out of 21 in DefaultHTMLCleaner. To overcome this problem CleaningFilter implementations were made components and they are now injected via plexus into DefaultHTMLCleaner (refer to components.xml) Necessary package restructuring was done. * Added tests to verify the behaviour of LineBreakCleaningFilter.
[snip]
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (1)
-
Asiri Rathnayake