Skip to main content

Introduction

mobile.htmlprocessing is a Python package providing utilities to sanitize arbitrary HTML content into mobile browser friendly format.

It is part of mFabrik Web and Mobile solutions package to build multichannel content management with Python.

Features

  • Rewrite <img> tags so that images are resized for mobile viewing

  • Make arbitraty input HTML to valid XHTML to more compatible with mobile phones

  • Enforce empty ALT text on images missing ALT attribute

  • Protect against Cross-Site Scripting Attacks (XSS) and other nastiness, as provided by lxml.html.clean. Both trusted HTML and non-trusted HTML processing modes are supported.

  • Unicode compliant - eats funky characters

This is a framework library which is designed to work with any web server or Python based CMS system. It allow rewrites HTML. You need to subclass and specialize provided base classes to match with your CMS paradigms. For examples, see Go Mobile for Plone CMS add-on product.

Requirements

Usage

Please see example code in unit tests.

Unit tests

Put mobile.htmlprocessing to your PYTHONPATH.

Run unit tests normally like:

python tests/test_image.py

See also

Source code and issue tracking

The project is hosted at Google Code project repository.

Commercial support and development

This package is licenced under open source GPL 2 license.

Commercial CMS and mobile development support options are available from mFabrik’s Web and Mobile product site.

Our top class Python developers are ready to help you with any software development needs.

Author

mFabrik Research Oy - Python and Plone professionals for hire.

Changelog

0.9.2 - current

  • Don’t choke on empty HTML documents [miohtama]

0.9.1 - 0.9.2

  • Depend on lxml [miohtama]

0.9 - 0.9.1

  • Fixed maintainer information [miohtama]

0.9

  • Major project restructuring [miohtama]

0.1

  • Initial release

Metadata

Release files for mobile.htmlprocessing 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mobile.htmlprocessing 1.0.0
File Size Uploaded
mobile.htmlprocessing-1.0.0.zip 14.7 kB Details

Release files / mobile.htmlprocessing-1.0.0.zip

Download URL mobile.htmlprocessing-1.0.0.zip
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f87bff8f1c373d03647963afeff862f20c8c457a924d1d9e8cdb32eb1e7900b3
BLAKE2b-256 checksum
How to use checksums
b43dea88e3ed528c7ab8b264ccc61833b54bbffc935fb49838fe8d521f3cf841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

0.9.1

1 release file

0.9

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page