Skip to content

Commit

Permalink
Merge pull request #327 from RockefellerArchiveCenter/development
Browse files Browse the repository at this point in the history
Retain `None` values passed through `strip_tags`
  • Loading branch information
helrond authored Feb 22, 2024
2 parents 6578e59 + 408a2ea commit ad0bf72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions process_request/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<xml>{user_string}</xml>')
textcontent = ''.join(xmldoc.itertext())
Expand Down

0 comments on commit ad0bf72

Please sign in to comment.