Skip to main content

Strip HTML tags, effectively turning HTML into plain text.

Project description

# lektor-strip-html-tags

This is a simple Lektor plugin that creates a template filter to remove HTML tags from a string. The use it was created for was to do processing on HTML outputted from a Markdown content field. The Markdown is rendered into HTML, and this filter can turn that into simple text, which was then passed to the [lektor-natural-language](https://github.com/terminal-labs/lektor-natural-language) filters to get keywords, unsullied by things like <div> tags.

Example usage:

{{ this.body|striphtmltags }}

Where this.body is for example <p><strong>Hello</strong>World!</p>, {{ this.body|striphtmltags }} will return simply Hello World!.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

lektor_strip_html_tags-0.2.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file lektor_strip_html_tags-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lektor_strip_html_tags-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13b5cd873681ea632fae827fc6d23425a24cfa57375719b6e3ea0da7df9d2c9d
MD5 b6201ab9fa8b58afc021989c43ffc094
BLAKE2b-256 03c68631121a13552e9772633542f8eb94ff93d32fedcfe50515ce47f14fa145

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