From 43ac7cfc6dcb17b7a44a60d3c3487e00208661b5 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 8 Nov 2023 23:27:20 +1100 Subject: [PATCH] fix: Only remove scripts --- requirements.txt | 3 +-- sites/website.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index e5cfa8b..f1de7fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,4 @@ py3dns passlib argon2-cffi mysql-connector-python -beautifulsoup4 -bleach \ No newline at end of file +beautifulsoup4 \ No newline at end of file diff --git a/sites/website.py b/sites/website.py index fda0f38..5be2417 100644 --- a/sites/website.py +++ b/sites/website.py @@ -1,6 +1,5 @@ from flask import Flask, make_response, redirect, render_template_string, request, jsonify, render_template, send_from_directory from bs4 import BeautifulSoup -import bleach def render(data): if data == "": @@ -12,7 +11,7 @@ def render(data): script.extract() modified = str(soup) - return render_template_string(bleach.clean(modified)) + return render_template_string(modified) except Exception as e: