It’s just data

Venus Updates

I’ve updated planet Venus.  Summary of the changes:

While I’m dog-fooding this myself, it might be wise to wait a few days to see what bugs shake out before upgrading.  When the bugs are shaken out the result should be more secure (example: HTML5lib will sanitize URI schemes), and should also fix Mozilla bug 514534 without the need to resort to the application/xhtml+xml mime type, which causes other problems.

Bug reports should go to the mailing list.


One fix already made... apparently simpletree and inject_meta_charset aren’t suitable for arbitrary html fragments.  Tracking sanitizer test failures, httplib2 failures, and stripping of tags.

Posted by Sam Ruby at

Just curious, what’s the status of Mars? Abandoned experiment?

Posted by Brendan Taylor at

Mars has an active userbase of approximately two.  (Planet Musings being the other one).  The biggest failing it has (from my perspective) is a dependency on html5lib for Ruby which to date has never attracted a critical mass of developers.  Generating a Ruby library (or a C library with a Ruby interface) from validator.nu would be ideal.  Getting the nokogiri folks interested in HTML5 tests shared between Validator.nu and HTML5lib would also an excellent solution.

Posted by Sam Ruby at

Looks like the new html5lib drops Python 2.4.x compatibility with its use of the any() function.

Posted by Scott Johnson at

Scott: There hasn’t been a deliberate decision to abandon 2.4 support, it’s more that development has happened on 2.5 and we haven’t taken particular care to retain 2.4 support. Neither have we previously got any complaints because of this. But if 2.4 support is important to you and is not a big hit to maintainability, it is likely that we could avoid 2.5isms for now.

Posted by jgraham at

But if 2.4 support is important to you and is not a big hit to maintainability, it is likely that we could avoid 2.5isms for now.

It’s definitely important to me.  All of my sites are currently hosted on RHEL5/CentOS5, which is stuck on Python 2.4.3.

Posted by Scott Johnson at

Scott, can you try adding the following near the top of html5parser.py to see if it addresses your issue?

try:
  any
except:
  def any(iterable):
    for element in iterable:
      if element:
        return True
    return False

If it does, I’ll commit the change to html5lib.

Posted by Sam Ruby at

I added the above code block immediately after the imports, and with any() now implemented, I’m no longer receiving python-related errors.

Posted by Scott Johnson at

committed.

Venus will pick up this change the next time I sync up with html5lib.

Posted by Sam Ruby at

Sam, where in the Venus source is the code for the ‘memes’ feature on Planet Intertwingly?

Posted by Michael R. Bernstein at

mememe.plugin

Posted by Sam Ruby at

It’s in the filters folder: [link]

Posted by Scott Johnson at

Thanks, Sam and Scott.

Posted by Michael R. Bernstein at

under review

Posted by Sam Ruby at

Add your comment