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. 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

