Skip to content

Commit

Permalink
fix: NoneType attribute has no replace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
hinakhadim committed Dec 14, 2023
1 parent e1a2064 commit 79f39fe
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cms/djangoapps/contentstore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ def translation_language(language):


def replace_script_tags(string):
string = string.replace('<script', '<div')
string = string.replace('</script>', '</div>')
return string
if type(string) == str:
string = string.replace('<script', '<div')
string = string.replace('</script>', '</div>')
return string

0 comments on commit 79f39fe

Please sign in to comment.