This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

gomobile.xhtmlmp provides XHTML mobile profile cleaner. It takes in arbitary HTML code and turns it to valid XHTML-MP code which can be dropped in XHTML MP page.

The code will also filter possible malicious code in external feed content, like <script> tags.


This package has no dependencies to Plone or GoMobile and can be used with any Python code.


  • Turn any incoming HTML/XHTML to mobile profile compatible
    • Enforce ALT text on images - especially useful for external tracking images (feedburner tracker)
  • Protect against Cross-Site Scripting Attacks (XSS) and other nastiness, as provided by lxml.html.clean
  • Unicode compliant - eats funky characters



This function will do everyhing you need.

Run XHTML mobile profile cleaner for HTML code:

@param html: HTML as a string or lxml Document
@return: XHTML, utf-8 encoded string


from gomobile.xhtmlmp.transformers.xhtmlmp_safe import clean_xhtml_mp

html = '<img src="">'
output = clean_xhtml_mp(html)
self.assertEqual(output, '<img src="" alt=""/>', "Got:" + output)


Future features will include:

  • Automatic resize for image sources

Unit tests

Put gomobile.xhtmlmp to your PYTHONPATH.

Run unit tests normally like:

python tests/


  • Initial release
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gomobile.xhtmlmp-0.1.tar.gz (4.0 kB) Copy SHA256 Checksum SHA256 Source Jul 23, 2009

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting