html sanitiezer from djang0byte
Project description
Djang0parser
Multifunctional html sanitizer with code highlighting and django integration
Installing
- In settings set VALID_TAGS and VALID_ATTRS, like:
>>> VALID_TAGS = 'a strong img cut' >>> VALID_ATTRS = 'href src'
Add djang0parser to INSTALLED_APPS and run syncdb.
Usage
- For text sanitizing use:
>>> from djang0parser.utils import parse >>> parse(text)
- or:
>>> parse(text, 'a b i img', 'src style')
- For reverting changes use:
>>> from djang0parser.utils import unparse >>> unparse(parsed_text)
- For finding user mention use:
>>> from djang0parser.utils import find_mentions >>> find_mentions(text)
- For cut and full cut(fcut) use:
>>> from djang0parser.utils import cut >>> preview, text = cut(full_text)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-parser-0.3.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-parser-0.3.tar.gz.
File metadata
- Download URL: django-parser-0.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d81511d2b32967c86d0a460677016d71fa65a7fdd8f9c2bdda4ae308f796359
|
|
| MD5 |
c002ac74b4bf3ad1cf3896fe093e8a71
|
|
| BLAKE2b-256 |
2b0d40f1e1abe3dca683afdbf22aadf993ae23b18bf4c7b7319b1008143e6da3
|
File details
Details for the file django_parser-0.3-py2-none-any.whl.
File metadata
- Download URL: django_parser-0.3-py2-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aebb19744a8eea46dd481fbe821527fb8b7c06d52cbea7790c662e32e00ee89
|
|
| MD5 |
dfa55dee47810dfdc9698d718470cda1
|
|
| BLAKE2b-256 |
a1ece0a2af50fbd820544af22e57fd66abe9ddf3212bb32d010119324ca96b6e
|