Hi Asiri,
see below
On Feb 19, 2009, at 1:21 PM, asiri (SVN) wrote:
Author: asiri
Date: 2009-02-19 13:21:06 +0100 (Thu, 19 Feb 2009)
New Revision: 16937
Added:
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
HTMLConstants.java
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
filter/AbstractHTMLFilter.java
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
filter/ElementFilterCriterion.java
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
filter/HTMLFilter.java
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/
html/filter/FontFilter.java
platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/internal/
html/filter/ListFilter.java
Removed:
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/HTMLConstants.java
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/ListCleaningFilter.java
Modified:
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
Log:
XWIKI-3240: 'style' attribute of <font> tag discarded when cleaning
html
* Fixed the issue.
* Changed all cleaning filters to use w3c dom document instead of
jdom.
Copied: platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/
html/HTMLConstants.java (from rev 16930, platform/core/trunk/xwiki-
xml/src/main/java/org/xwiki/xml/internal/html/HTMLConstants.java)
===================================================================
--- platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
HTMLConstants.java (rev 0)
+++ platform/core/trunk/xwiki-xml/src/main/java/org/xwiki/xml/html/
HTMLConstants.java 2009-02-19 12:21:06 UTC (rev 16937)
@@ -0,0 +1,190 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *
+ */
+package org.xwiki.xml.html;
+
+/**
+ * HTML Constants used by the HTML Cleaner.
+ *
+ * @version $Id: $
+ * @since 1.6M2
+ */
+public interface HTMLConstants
Can we use an Enum type instead?
I'm not sure why you changed CleaningFilter to HTMLFilter. They are
HTML filters for sure but not any type of HTML filters they are HTML
Cleaning Filters. It's not very important but I had chosen
CleaningFilter name voluntarily so I wanted to know what's your
rationale for changing the name.
Why have you removed the doc type cleaning filter and instead
"hardcoded" it in the default cleaner implementation?
Note: Haven't checked the criterion stuff yet, so I'm not sure what
this is about.
Question: have you been careful about performance? HTML cleaning is
the most costly thing in our rendering system so we have to be very
careful. Have you measured the rendering test speed before and after
as an indication?
Thanks
-Vincent
[snip]