I'm using old VBScript in my ASP application. Trying to search and replace string using Replace(wholeText, textToSearch, textToReplace) function but i'm getting the following error:
Microsoft VBScript runtime error '800a005e'
Invalid use of Null: 'Replace'
/instance/inst_spam_gen_4.asp, line 25
And here is my function:
Function cleanUpText(txt)
txt = Replace(txt, "“", """")
txt = Replace(txt, "”", """")
txt = Replace(txt, "’", "'")
txt = Replace(txt, "®", "®")
cleanUpText = txt
End Function
How can I solve this problem?
Thanks