Skip to content

Commit

Permalink
Update __init__.py (#702)
Browse files Browse the repository at this point in the history
added CDATA tag to string to objectDataString function. this allows the text to have characters that are normally not valid as part of XML string.  For example "<" is encoded to the xml as "&lt;"
  • Loading branch information
russell-d-e authored May 6, 2022
1 parent b18be4e commit 4ee9dbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ScrapingToolKit/Evidence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def objectDataString(typeStr, value):
trace()
rtnStr = ""
if value != None:
rtnStr+='<{type}>{value}</{type}>'\
rtnStr+='<{type}><![CDATA[{value}]]></{type}>'\
.replace("{type}",typeStr)\
.replace("{value}", value)
return rtnStr

0 comments on commit 4ee9dbb

Please sign in to comment.