Skip to main content

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.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.

Source Distribution

nti.contentfragments-1.5.0.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

nti.contentfragments-1.5.0-py2.py3-none-any.whl (48.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nti.contentfragments-1.5.0.tar.gz.

File metadata

  • Download URL: nti.contentfragments-1.5.0.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for nti.contentfragments-1.5.0.tar.gz
Algorithm Hash digest
SHA256 2f02034693672440bf96e965783fb0fb83c5668932af4902cc1bf79c155ca9ba
MD5 607ec346bcded6efd3695b6eac6e9f6f
BLAKE2b-256 596cf3c07900f14089f4d069fd9e2937472195392b337b2a3ab2030da64f3a47

See more details on using hashes here.

File details

Details for the file nti.contentfragments-1.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: nti.contentfragments-1.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for nti.contentfragments-1.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0bb24a8d694b218c5d3848e08c225bb6461962f5ed893132c8be38837dc71ef2
MD5 17c98a1ffb64a270e2a9d684fedef00e
BLAKE2b-256 0907a2768b07ddc7865280c708d280160ae73252e7f7024a323ff59ce912b183

See more details on using hashes here.

Supported by

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