|Pathologically Eclectic Rubbish Lister|
Simplify HTML programaticallyby guha (Priest)
|on Jun 07, 2006 at 21:01 UTC||Need Help??|
guha has asked for the
wisdom of the Perl Monks concerning the following question:
* The HTML from is extremely wordy, heh, a rather simple table can generate megabytes of HTML
A possible solution to this problem would be if I could somehow simplify the pasted HTML when saving it to the DB.
Something like take this very complex HTML and allow only tables, bold, italic, h1,h2, plain text, ... and remove everything else. This would change the WYSIWYG but not the content.
I have tried to, using regexps, remove certain specific Word-HTML constructs. This has the advantage of decreasing the size of the resulting HTML but seems to destabilize stuff as well.
Ideas, pointers to CPAN, anyone ?