From cc6f3157cc6d795a951ddfb75abc6be0de01b2f7 Mon Sep 17 00:00:00 2001 From: Max Levine Date: Fri, 17 Jun 2022 16:41:50 +0100 Subject: [PATCH 1/3] Markup should be imported from MarkupSafe --- flask_xcaptcha.py | 7 +++++-- setup.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/flask_xcaptcha.py b/flask_xcaptcha.py index 8bbe56d..33c7c8e 100644 --- a/flask_xcaptcha.py +++ b/flask_xcaptcha.py @@ -10,9 +10,12 @@ try: from flask import request - from jinja2 import Markup + try: + from jinja2 import Markup + except ImportError: + from markupsafe import Markup import requests -except ImportError as ex: +except ImportError: print("Missing dependencies") diff --git a/setup.py b/setup.py index fd4b3c4..4c71d1c 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ install_requires=[ "flask", "requests" + "MarkupSafe" ], keywords=['flask', 'recaptcha', 'hcaptcha', 'xcaptcha', "validate"], platforms='any', From a3a0d210ae64ee58d1f1b150a643673f85831172 Mon Sep 17 00:00:00 2001 From: Max Levine Date: Fri, 17 Jun 2022 16:46:28 +0100 Subject: [PATCH 2/3] Update Travis CI link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9fb90c6..df2e707 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Flask-xCaptcha -[![Build Status](https://travis-ci.com/benjilev08/flask-xcaptcha.svg?branch=master)](https://travis-ci.com/benjilev08/flask-xcaptcha) +[![Build Status](https://app.travis-ci.com/bmaximuml/flask-xcaptcha.svg?branch=master)](https://app.travis-ci.com/bmaximuml/flask-xcaptcha) The new xCaptcha implementation for Flask without Flask-WTF. From f51b33d118bfe71b1b7b96e0b671583a48dd69a2 Mon Sep 17 00:00:00 2001 From: Max Levine Date: Fri, 17 Jun 2022 16:47:03 +0100 Subject: [PATCH 3/3] Version bump to 0.5.3 --- CHANGELOG | 6 +++++- README.md | 2 +- flask_xcaptcha.py | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 922f02b..6ca6972 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +- 0.5.3 + - Markup should be imported from MarkupSafe + - 0.5.2 - Project URL updated - Use Travis CI for testing @@ -28,4 +31,5 @@ - Make use of requests - Version 0.1.0 - - First version \ No newline at end of file + - First version + diff --git a/README.md b/README.md index df2e707..50e4777 100644 --- a/README.md +++ b/README.md @@ -157,4 +157,4 @@ Returns a bool indicating whether or not the xCaptcha was successfully completed This will insert an HTML div element containing the captcha into a Jinja2 template -(c) 2020 Max Levine +(c) 2022 Max Levine diff --git a/flask_xcaptcha.py b/flask_xcaptcha.py index 33c7c8e..c9bd6ae 100644 --- a/flask_xcaptcha.py +++ b/flask_xcaptcha.py @@ -3,10 +3,10 @@ """ __NAME__ = "Flask-xCaptcha" -__version__ = "0.5.2" +__version__ = "0.5.3" __license__ = "MIT" __author__ = "Max Levine" -__copyright__ = "(c) 2020 Max Levine" +__copyright__ = "(c) 2022 Max Levine" try: from flask import request