Skip to content

Commit ad0bf72

Browse files
authored
Merge pull request #327 from RockefellerArchiveCenter/development
Retain `None` values passed through `strip_tags`
2 parents 6578e59 + 408a2ea commit ad0bf72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

process_request/routines.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Processor(object):
2121

2222
def strip_tags(self, user_string):
2323
"""Strips XML and HTML tags from a string."""
24+
if user_string is None:
25+
return None
2426
try:
2527
xmldoc = ET.fromstring(f'<xml>{user_string}</xml>')
2628
textcontent = ''.join(xmldoc.itertext())

0 commit comments

Comments
 (0)