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