From 111810412bc670a453c95e0f0568d6a0b922e220 Mon Sep 17 00:00:00 2001 From: Clinton Graham Date: Thu, 22 Feb 2024 08:39:58 -0500 Subject: [PATCH] #325: passthru None on strip_tags() --- process_request/routines.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process_request/routines.py b/process_request/routines.py index 606bfec..a2eee56 100644 --- a/process_request/routines.py +++ b/process_request/routines.py @@ -21,6 +21,8 @@ class Processor(object): def strip_tags(self, user_string): """Strips XML and HTML tags from a string.""" + if user_string is None: + return None try: xmldoc = ET.fromstring(f'{user_string}') textcontent = ''.join(xmldoc.itertext())