Skip to content

Commit

Permalink
Merge pull request #326 from RockefellerArchiveCenter/issue-325
Browse files Browse the repository at this point in the history
#325: passthru None on strip_tags()
  • Loading branch information
helrond authored Feb 22, 2024
2 parents a658fb1 + 1118104 commit 408a2ea
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 408a2ea

Please sign in to comment.