Skip to main content

Plugin for safe text editing with MKDocs.

Project description

Build Status PyPI version Codecov BSD License Requirements Status

Plugin for safe text editing with MKDocs.

Table of Contents

How does this plugin work?

Markdown is a very flexible format, and raw HTML is allowed. But it is unnecessary in multiple-person text editing.

When raw HTML like <font> tag is used in MKDocs, it is rendered as it is.

No escaped font

If you use this plug-in with MKDocs, tags that are not allowed in the whitelist are escaped.

Escaped font

Installation

Install it via PyPI using pip command.

$ pip install mkdocs-safe-text-plugin

And add it to your mkdocs.yml file.

plugins:
  - mkdocs_safe_text

An example of use can be checked by example/basic-usage.

Plugin configuration

This plugin works with the HTML tag element for Markdown defined by bleach-whitelist enabled. This implementation approach is recommended in the Python-Markdown release notes.

And user can change this setting.

plugins:
  - mkdocs_safe_text:
      append_allowed_tags:
        - tag1
        - tag2
      remove_allowed_tags:
        - tag3
        - tag4
      allowed_attrs:
        tag5:
          - attribute1
          - attribute2

An example of use can be checked by example/customization-usage.

License

BSD 2-Clause License

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

mkdocs-safe-text-plugin-0.5.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_safe_text_plugin-0.5.0-py2.py3-none-any.whl (7.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mkdocs-safe-text-plugin-0.5.0.tar.gz.

File metadata

File hashes

Hashes for mkdocs-safe-text-plugin-0.5.0.tar.gz
Algorithm Hash digest
SHA256 4ff73db23a08782acdce5a060761971889b1ea6c6a14ed64fbc84d33bb34bd76
MD5 c9eee16e00004c4ac9526a341ccb0da6
BLAKE2b-256 cc849cfa860ce64f5c2841501ade5efdc9339fa05aae479550b2ba6a83101f71

See more details on using hashes here.

File details

Details for the file mkdocs_safe_text_plugin-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_safe_text_plugin-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d165437dc77af6c352fa11b26ef4d75ff84a46c04cf44f9beeaaffa3ddf21c70
MD5 4a764cb8de2634f5592930e074679663
BLAKE2b-256 a3ed90856d105a884f7393b327b5fb0d28e56ac571d747ba9ae100451e659221

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