Wang Ning wrote:
Hi,
Using the HtmlCleaner 2.1, we can just replace the deprecated tags to
appropriate alternative. We can remove TagSwapCleaningFilter.java and
set CleanerTransformations in DefaultHTMLCleaner.java instead.
Now we only swap <i> to <em>, <b> to <strong>. Is it necessary
to
replace more deprecated tags?
I collect some other tags I think can be replaced.
s -> del
strike -> del
u -> ins or <p class="underline">
centre -> <span style="text-align:center">
font -> <span style="color:red;font-family=Arial;font-size=12;">
basefont -> <span style="color:red;font-family=Arial;font-size=12;">
Should we replaces all the tags above to their alternative? WDYT?
Yes, but I'd like to have a parameter/flag to set an even stricter
cleanup, which will discard font, center and basefont tags. Generally,
any style information will be discarded when this flag is set.
There are some deprecated tags which don't have
explicit alternative, as below:
applet
dir
This can become <span dir="...">, see
http://www.w3.org/TR/2008/PR-xhtml-modularization-20080611/abstract_modules…
menu
isindex
--
Sergiu Dumitriu
http://purl.org/net/sergiu/