Skip to main content

Provides a event subscriber that cleans up the html code of text pasted from MSWord.

Project description

Introduction

This product provides an event subscriber for BaseContent Archetypes objects that will clean up the HTML of all the RichText fields for each object.

This is especially a problem when users copy and paste from MSWord into FCKEditor.

The operation runs automatically every time an object is created or edited and can be disabled/enabled in the Settings fieldset of the object’s normal ‘edit’ view.

The cleaning and sanitizing of the HTML code is mainly done by using the lxml library: http://codespeak.net/lxml/lxmlhtml.html

This Product does not have to be installed via quick_installer or the plone control panel.

Changelog

1.2.5 (2009-12-07)

  • Set add_nofollow to False, since it seems to confuse lxmk.html parser (thomasw).

1.2.4 (2009-11-25)

  • Added LinguaPlone’s generateMethods magic, so that the languageIndependent field gets propagated to all translations when the canonical is edited (thomasw)

1.2.3 (2009-11-19)

  • don’t strip ‘h1’ and ‘h2’ (jcbrand)

1.2.2 (2009-11-16)

  • added a more flexible detection mechanism - encoding (pilz)

1.2.1 (2009-11-03)

  • I was too stupid to make a successful release, here we go again (thomasw)

1.2 (2009-11-03)

  • Bugfix in event-handler: don’t fail if cleanWordPastedText field isn’t present (thomasw)

1.1 - 2009-10-27

  • Add a new sanitize method and new helper methods. Thanks to Wichert.

  • Enable the cleaner by default. (jcbrand)

1.0 - 2009-10-23

  • Initial release (jcbrand)

Contributors:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slc.cleanwordpastedtext-1.2.5.tar.gz (16.4 kB view details)

Uploaded Source

File details

Details for the file slc.cleanwordpastedtext-1.2.5.tar.gz.

File metadata

File hashes

Hashes for slc.cleanwordpastedtext-1.2.5.tar.gz
Algorithm Hash digest
SHA256 b5118998b81c2f660e0686eecc71133ec8acd43c79c83903b462409908faabd0
MD5 cf13e3b9777ee518d0f4afa87b13fa7c
BLAKE2b-256 dbf5953062440d6be9b95556571da9b64d4425e244fe72d75ff53736993d3331

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page