back-cleaner-0.0.2
توضیحات
Server-side Python tool for escaping script tags and converting characters into HTML entity equivalents (no regex)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | back-cleaner-0.0.2 |
| نام | back-cleaner |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Rairye |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/Rairye/back-cleaner |
| آدرس اینترنتی | https://pypi.org/project/back-cleaner/ |
| مجوز | apache-2.0 |
# back-cleaner
Server-side Python tool for escaping script tags and converting characters into HTML entity equivalents (no regex).
## def escape_script_tags(input_str)
This function escapes script tags with backslashes.
### Sample
from back_cleaner.cleaner import escape_script_tags
source = "<script>Hey, how are you doing?</script>"
result = escape_script_tags(source)
print(result)
## def replace_with_ents(input_str)
This function converts the following characters into the HTML entity equivalents.
1. Ampersand (&)
2. Less than (<)
3. Greater than (>)
4. Double quote (")
5. Single quote (')
### Sample
from back_cleaner.cleaner import replace_with_ents
source = "<script>Hey, how are you doing?</script>"
result = replace_with_ents(source)
print(result)
نحوه نصب
نصب پکیج whl back-cleaner-0.0.2:
pip install back-cleaner-0.0.2.whl
نصب پکیج tar.gz back-cleaner-0.0.2:
pip install back-cleaner-0.0.2.tar.gz