Potential new feature: post dodginess.

Danilo Segan danilo at kvota.net
Thu Feb 9 05:49:09 EST 2006


On Monday at 1:31, Jeff Waugh wrote:

> <quote who="Jeff Waugh">
>
>> ... and in fact, you can have it immediately if you can install the python
>> mxtidy package (which doesn't seem to exist in Debian/Ubuntu). If you have
>> that, feedparser will automagically use it. I've heard some dodgy reports,
>> breakage and so on, but haven't been able to test it much myself.
>
> Hrm, there is a package for the TidyLib Python wrapper though, which the 4.1
> version of feedparser supports (and prefers)! So, once we upgrade, you'll be
> able to use either. Hooray!
>
> Annoyingly though, there's a TIDY_MARKUP = 0 in feedparser.py, so we'll have
> to modify that (or tell users to) - it does properly check for the existence
> of the Python modules though, so perhaps we could just enable it by default.
>
> Another good reason to bring in feedparser 4.1 support for Planet 1.2. :-)

The patch I've been happily using for over a year (no post has ever
screwed up my mark-up on http://planetoid.srpski.org since I've been
using this), along with feedparser 3.3: 

  http://kvota.net/hacks/planet/feedparser3.3-closetags-patch

It makes sure there are no things such as

  <b>Blah <i>Italics</b> something</i>

as well, along with closing all the tags (it would "fix" the above to
become "<b>Blah <i>Italics something</i></b>", so while some context
would be lost, it'd still be valid and limited in effect).  It would
be trivial to make it instead output "<b>Blah <i>Italics</i></b>
something", if anyone is interested.  The idea is that these cases
would be rare enough so they only need not mess with the general
planet layout.

Of course, it's not nearly as good as running a complete tidy process
over HTML. :)


Cheers,
Danilo


More information about the devel mailing list