Skip to content

Commit

Permalink
Add extra "sanitize" (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
plenaerts authored Jul 30, 2024
1 parent 5e3df46 commit 81da3f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ Install the package:
venv/bin/pip install django-prose-editor
To include nh3 as optional dependency for sanitized HTML, install the extra
"sanitize":

.. code-block:: shell
venv/bin/pip install django-prose-editor[sanitize]
Add ``django_prose_editor`` to ``INSTALLED_APPS``:

.. code-block:: python
Expand Down Expand Up @@ -65,6 +72,8 @@ snippet to always pass HTML through `nh3
description = SanitizedProseEditorField()
Install django-prose-editor with the extra "sanitize" to use
``SanitizedProseEditorField``.

Convenience
~~~~~~~~~~~
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ optional-dependencies.tests = [
"coverage",
"nh3",
]
optional-dependencies.sanitize = [
"nh3",
]
urls.Homepage = "https://github.com/matthiask/django-prose-editor/"

[tool.hatch.build]
Expand Down

0 comments on commit 81da3f2

Please sign in to comment.