Skip to main content

Server-side Python tool for escaping script tags and converting characters into HTML entity equivalents (no regex)

Project description

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)

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

back_cleaner-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

back_cleaner-0.0.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file back_cleaner-0.0.2.tar.gz.

File metadata

  • Download URL: back_cleaner-0.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for back_cleaner-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5fcbeb2f506b0918deeda5981d52e99f1270172e57713fd88a6ec0c4655a3a51
MD5 9955e6e6cbcea64f373f9716bf20fa46
BLAKE2b-256 1193a0894045d9fb9b96c48b7965e1d7be7df71c1eb6be9914e2dadfe3d1d92b

See more details on using hashes here.

File details

Details for the file back_cleaner-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: back_cleaner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.9

File hashes

Hashes for back_cleaner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f21bd3042588bfb15e5e0712b2bc3204e5340e5a4700b99d9c203038ef46699
MD5 4b4d89f1f97abc6529204fa9984eac79
BLAKE2b-256 ecb210e82fda3313376800b808e74adbe828a920c333ec3721e9c02e95bf9dac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page