mkdocs-safe-text-plugin


Namemkdocs-safe-text-plugin JSON
Version 1.6.1 PyPI version JSON
download
home_pageNone
SummaryPlugin for safe text editing with MKDocs.
upload_time2024-07-22 10:44:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseBSD-2-Clause
keywords mkdocs bleach xss
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mkdocs-safe-text-plugin

[![Build Status](https://github.com/raimon49/mkdocs-safe-text-plugin/workflows/Python%20package/badge.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/actions?query=workflow%3A%22Python+package%22) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-safe-text-plugin.svg)](https://pypi.org/project/mkdocs-safe-text-plugin/) [![PyPI version](https://badge.fury.io/py/mkdocs-safe-text-plugin.svg)](https://badge.fury.io/py/mkdocs-safe-text-plugin) [![GitHub Release](https://img.shields.io/github/release/raimon49/mkdocs-safe-text-plugin.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/releases) [![Codecov](https://codecov.io/gh/raimon49/mkdocs-safe-text-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/raimon49/mkdocs-safe-text-plugin) [![BSD License](http://img.shields.io/badge/license-BSD-green.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/blob/master/LICENSE)

Plugin for safe text editing with [MKDocs](http://www.mkdocs.org/).

## Table of Contents

 * [How does this plugin work?](#how-does-this-plugin-work)
 * [Installation](#installation)
 * [Plugin configuration](#plugin-configuration)
 * [License](#license)

## 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](https://user-images.githubusercontent.com/221802/35481481-ac9e4894-0467-11e8-89ab-47ca5037d9d2.png)

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

![Escaped font](https://user-images.githubusercontent.com/221802/35481484-b268e02c-0467-11e8-8b7a-c3c7232312ed.png)

## Installation

Install it via PyPI using `pip` command.

```console
$ pip install mkdocs-safe-text-plugin
```

And add it to your `mkdocs.yml` file.

```yaml
plugins:
  - mkdocs_safe_text
```

An example of use can be checked by [example/basic-usage](https://github.com/raimon49/mkdocs-safe-text-plugin/tree/master/examples/basic-usage).

## Plugin configuration

This plugin works with the HTML tag element for Markdown defined by [bleach-allowlist](https://github.com/yourcelf/bleach-allowlist/blob/main/bleach_allowlist/bleach_allowlist.py) enabled. This implementation approach is recommended in [the Python-Markdown release notes](https://python-markdown.github.io/change_log/release-2.6/).

And user can change this setting.

```yaml
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](https://github.com/raimon49/mkdocs-safe-text-plugin/tree/master/examples/customization-usage).

## License

[BSD 2-Clause License](https://github.com/raimon49/mkdocs-safe-text-plugin/blob/master/LICENSE)

## CHANGELOG

### 1.6.1

* Use SPDX short identifier style for license text

### 1.6.0

* Clarified support for Python 3.12
* Dropped support Python 3.7 and Python 3.8
* Migration pyproject.toml about this package

### 1.5.1

* Clarified support for Python 3.11(fix metadata)

### 1.5.0

* Clarified support for Python 3.11

### 1.4.0

* Clarified support for Python 3.10
* Dropped support Python 3.6

### 1.3.1

* Requires `bleach-allowlist` version 1.0.3 or higher

### 1.3.0

* Migrate using Python package from `bleach-whitelist` to `bleach-allowlist`
* Clarified support for Python 3.9
* Dropped support Python 3.5

### 1.2.0

* Clarified support for Python 3.8
* Dropped support Python 2.7

### 1.1.2

* Dropped support Python 3.4

### 1.1.1

* Fix to work even after MKDocs 1.0
* Dropped support Python 3.3

### 1.1.0

* Embed distribution license in source code
* Remove dependency on 'pytest-pythonpath'

### 1.0.0

* First stable release version
    * Support Python 3.3 or later

### 0.5.0

* Support reST format in PyPI Web UI
    * Add dependency on pypandoc

### 0.4.0

* Update status to Beta version
    * Add documentation about this plugin
    * Add a Makefile for tidy tasks

### 0.3.0

* Update status to Alpha version

### 0.2.0

* Implement plugin configuration
    * Add class files to `mkdocssafetext`
    * Add unittest files to `tests`

### 0.1.0

* First planning version
    * Make temporary directory structure
    * Add requirement specifiers

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mkdocs-safe-text-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mkdocs, bleach, xss",
    "author": null,
    "author_email": "raimon <raimon49@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/92/69/4e7028a62a869635c0cc341771546153f2a79e9b3352352e687d409773b5/mkdocs_safe_text_plugin-1.6.1.tar.gz",
    "platform": null,
    "description": "# mkdocs-safe-text-plugin\n\n[![Build Status](https://github.com/raimon49/mkdocs-safe-text-plugin/workflows/Python%20package/badge.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/actions?query=workflow%3A%22Python+package%22) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mkdocs-safe-text-plugin.svg)](https://pypi.org/project/mkdocs-safe-text-plugin/) [![PyPI version](https://badge.fury.io/py/mkdocs-safe-text-plugin.svg)](https://badge.fury.io/py/mkdocs-safe-text-plugin) [![GitHub Release](https://img.shields.io/github/release/raimon49/mkdocs-safe-text-plugin.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/releases) [![Codecov](https://codecov.io/gh/raimon49/mkdocs-safe-text-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/raimon49/mkdocs-safe-text-plugin) [![BSD License](http://img.shields.io/badge/license-BSD-green.svg)](https://github.com/raimon49/mkdocs-safe-text-plugin/blob/master/LICENSE)\n\nPlugin for safe text editing with [MKDocs](http://www.mkdocs.org/).\n\n## Table of Contents\n\n * [How does this plugin work?](#how-does-this-plugin-work)\n * [Installation](#installation)\n * [Plugin configuration](#plugin-configuration)\n * [License](#license)\n\n## How does this plugin work?\n\nMarkdown is a very flexible format, and raw HTML is allowed. But it is unnecessary in multiple-person text editing.\n\nWhen raw HTML like `<font>` tag is used in MKDocs, it is rendered as it is.\n\n![No escaped font](https://user-images.githubusercontent.com/221802/35481481-ac9e4894-0467-11e8-89ab-47ca5037d9d2.png)\n\nIf you use this plug-in with MKDocs, tags that are not allowed in the allowlist are escaped.\n\n![Escaped font](https://user-images.githubusercontent.com/221802/35481484-b268e02c-0467-11e8-8b7a-c3c7232312ed.png)\n\n## Installation\n\nInstall it via PyPI using `pip` command.\n\n```console\n$ pip install mkdocs-safe-text-plugin\n```\n\nAnd add it to your `mkdocs.yml` file.\n\n```yaml\nplugins:\n  - mkdocs_safe_text\n```\n\nAn example of use can be checked by [example/basic-usage](https://github.com/raimon49/mkdocs-safe-text-plugin/tree/master/examples/basic-usage).\n\n## Plugin configuration\n\nThis plugin works with the HTML tag element for Markdown defined by [bleach-allowlist](https://github.com/yourcelf/bleach-allowlist/blob/main/bleach_allowlist/bleach_allowlist.py) enabled. This implementation approach is recommended in [the Python-Markdown release notes](https://python-markdown.github.io/change_log/release-2.6/).\n\nAnd user can change this setting.\n\n```yaml\nplugins:\n  - mkdocs_safe_text:\n      append_allowed_tags:\n        - tag1\n        - tag2\n      remove_allowed_tags:\n        - tag3\n        - tag4\n      allowed_attrs:\n        tag5:\n          - attribute1\n          - attribute2\n```\n\nAn example of use can be checked by [example/customization-usage](https://github.com/raimon49/mkdocs-safe-text-plugin/tree/master/examples/customization-usage).\n\n## License\n\n[BSD 2-Clause License](https://github.com/raimon49/mkdocs-safe-text-plugin/blob/master/LICENSE)\n\n## CHANGELOG\n\n### 1.6.1\n\n* Use SPDX short identifier style for license text\n\n### 1.6.0\n\n* Clarified support for Python 3.12\n* Dropped support Python 3.7 and Python 3.8\n* Migration pyproject.toml about this package\n\n### 1.5.1\n\n* Clarified support for Python 3.11(fix metadata)\n\n### 1.5.0\n\n* Clarified support for Python 3.11\n\n### 1.4.0\n\n* Clarified support for Python 3.10\n* Dropped support Python 3.6\n\n### 1.3.1\n\n* Requires `bleach-allowlist` version 1.0.3 or higher\n\n### 1.3.0\n\n* Migrate using Python package from `bleach-whitelist` to `bleach-allowlist`\n* Clarified support for Python 3.9\n* Dropped support Python 3.5\n\n### 1.2.0\n\n* Clarified support for Python 3.8\n* Dropped support Python 2.7\n\n### 1.1.2\n\n* Dropped support Python 3.4\n\n### 1.1.1\n\n* Fix to work even after MKDocs 1.0\n* Dropped support Python 3.3\n\n### 1.1.0\n\n* Embed distribution license in source code\n* Remove dependency on 'pytest-pythonpath'\n\n### 1.0.0\n\n* First stable release version\n    * Support Python 3.3 or later\n\n### 0.5.0\n\n* Support reST format in PyPI Web UI\n    * Add dependency on pypandoc\n\n### 0.4.0\n\n* Update status to Beta version\n    * Add documentation about this plugin\n    * Add a Makefile for tidy tasks\n\n### 0.3.0\n\n* Update status to Alpha version\n\n### 0.2.0\n\n* Implement plugin configuration\n    * Add class files to `mkdocssafetext`\n    * Add unittest files to `tests`\n\n### 0.1.0\n\n* First planning version\n    * Make temporary directory structure\n    * Add requirement specifiers\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "Plugin for safe text editing with MKDocs.",
    "version": "1.6.1",
    "project_urls": {
        "Changelog": "https://github.com/raimon49/mkdocs-safe-text-plugin/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/raimon49/mkdocs-safe-text-plugin",
        "Issues": "https://github.com/raimon49/mkdocs-safe-text-plugin/issues",
        "Releases": "https://github.com/raimon49/mkdocs-safe-text-plugin/releases"
    },
    "split_keywords": [
        "mkdocs",
        " bleach",
        " xss"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7669e83dde27b75820442f0ac59c777cf051e33a7245b46b6a61aa9dd1c27ee0",
                "md5": "6b4d97884fe7297c8f97bd42ed71a107",
                "sha256": "ac3bbd4ca7db38fbbec224f90e92bce7189977268cca0ee9e09340f7e7af0f9a"
            },
            "downloads": -1,
            "filename": "mkdocs_safe_text_plugin-1.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6b4d97884fe7297c8f97bd42ed71a107",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7788,
            "upload_time": "2024-07-22T10:44:51",
            "upload_time_iso_8601": "2024-07-22T10:44:51.565449Z",
            "url": "https://files.pythonhosted.org/packages/76/69/e83dde27b75820442f0ac59c777cf051e33a7245b46b6a61aa9dd1c27ee0/mkdocs_safe_text_plugin-1.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92694e7028a62a869635c0cc341771546153f2a79e9b3352352e687d409773b5",
                "md5": "13dc23b0bbeed968b54d86fc1e65394b",
                "sha256": "664be5a6dd17582f5b0c45f2f8f66735e64151a360ea65066cdb3bfe2bc1202a"
            },
            "downloads": -1,
            "filename": "mkdocs_safe_text_plugin-1.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "13dc23b0bbeed968b54d86fc1e65394b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6460,
            "upload_time": "2024-07-22T10:44:53",
            "upload_time_iso_8601": "2024-07-22T10:44:53.059607Z",
            "url": "https://files.pythonhosted.org/packages/92/69/4e7028a62a869635c0cc341771546153f2a79e9b3352352e687d409773b5/mkdocs_safe_text_plugin-1.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-22 10:44:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "raimon49",
    "github_project": "mkdocs-safe-text-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "mkdocs-safe-text-plugin"
}
        
Elapsed time: 4.21263s