Thanks.

I've thought about extracting it, but I think it's a lot of work unless you want to support only Django and rST which is what we're using. At least the iframe part is very specific to the web framework.