Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

NTI ContentFragments

Project description

nti.contentfragments

Latest release Supported Python versions https://travis-ci.org/NextThought/nti.contentfragments.svg?branch=master https://coveralls.io/repos/github/NextThought/nti.contentfragments/badge.svg Documentation Status

Support for working with string-based content in a Zope3/ZTK environment.

Overview

In a client/server environment dealing with various types of content from users, it’s important to know what not just the Python type of a particular string is, but also what the semantic type of the string is: HTML, plain text, LaTeX, etc.

This package defines interfaces and classes to be able to record this information. It also features a framework for transforming between the various supported semantic types (e.g., HTML to plain text).

Other features:

  • Support for making arbitrary incoming HTML safe (sanitizing it).
  • Support for very configurable (optionally) event-based profanity censoring that integrates with nti.schema/zope.schema.

See the documentation for more details.

Changes

1.7.0 (2020-10-07)

  • Allow conversion of reStructuredText fragments to plain text.

1.6.1 (2020-09-14)

  • Ensure disallowed tags nested within anchors do not raise. See issue 34 <https://github.com/NextThought/nti.contentfragments/issues/34>.

1.6.0 (2020-09-02)

  • Add support for reStructuredText content fragments and corresponding fields.

1.5.0 (2020-07-23)

  • When sanitizing html, disable link creation when already under an anchor.

1.4.0 (2020-06-17)

  • Allow IAllowedAttributeProvider to be registered to provide additional attributes that would be allowed in sanitized content fragments.

1.3.0 (2020-04-06)

1.2.1 (2019-11-07)

1.2.0 (2018-10-15)

  • Add support for Python 3.7. Note that datrie is not yet available for Python 3.7.
  • Add support for PyPy3.
  • Add interfaces for all schema fields defined in nti.contentfragments.schema and make the respective classes implement them.

1.1.1 (2018-06-29)

1.1.0 (2017-06-14)

  • Remove dependency of dolmen.builtins. The interfaces IUnicode, IBytes and IString are now always defined by this package.
  • Add support for Python 3.6.

1.0.0 (2016-08-19)

  • Add support for Python 3.
  • Stop configuring plone.i18n. It’s a big dependency and doesn’t work on Python 3.
  • Introduce our own interfaces for IUnicode and IString, subclassing dolmen.builtins.IUnicode and IString, respectively, if possible.
  • The word lists used in censoring are cached in memory.
  • nti.contentfragments.html._Serializer has been renamed and is no longer public.
  • Depend on zope.mimetype >= 2.1.0 for better support of Python 3.

Project details


Download files

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

Files for nti.contentfragments, version 1.7.0
Filename, size File type Python version Upload date Hashes
Filename, size nti.contentfragments-1.7.0-py2.py3-none-any.whl (51.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size nti.contentfragments-1.7.0.tar.gz (53.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page