From e92ba1c90138d773f1363fc941292c4e8aee7367 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Fri, 15 Mar 2019 00:44:51 -0700 Subject: [PATCH] Add bleach for sanitizing HTML. Example: ```js languagePluginLoader.then(() => { // pyodide is now ready to use... pyodide.loadPackage('bleach').then(() => { pyodide.runPython(` import bleach print(bleach.clean('There is good stuff in here.')) `); }); }); ``` leads to the output: ``` There is good stuff <script>and bad stuff</script> in here. ``` --- packages/bleach/meta.yaml | 13 +++++++++++++ packages/webencodings/meta.yaml | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 packages/bleach/meta.yaml create mode 100644 packages/webencodings/meta.yaml diff --git a/packages/bleach/meta.yaml b/packages/bleach/meta.yaml new file mode 100644 index 000000000..422049d09 --- /dev/null +++ b/packages/bleach/meta.yaml @@ -0,0 +1,13 @@ +package: + name: bleach + version: 3.1.0 +source: + sha256: 3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa + url: https://files.pythonhosted.org/packages/78/5a/0df03e8735cd9c75167528299c738702437589b9c71a849489d00ffa82e8/bleach-3.1.0.tar.gz +requirements: + run: + - setuptools + - webencodings +test: + imports: + - bleach diff --git a/packages/webencodings/meta.yaml b/packages/webencodings/meta.yaml new file mode 100644 index 000000000..efaac8d85 --- /dev/null +++ b/packages/webencodings/meta.yaml @@ -0,0 +1,9 @@ +package: + name: webencodings + version: 0.5.1 +source: + sha256: b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 + url: https://files.pythonhosted.org/packages/0b/02/ae6ceac1baeda530866a85075641cec12989bd8d31af6d5ab4a3e8c92f47/webencodings-0.5.1.tar.gz +test: + imports: + - webencodings