From: S N on
how to print apostrophe character ' and double quote " in asp using
vbscript.
my code using response.write replaces " character with inverted question
mark.
please help


From: S N on
how to print apostrophe character ' and double quote " in asp using
vbscript. my code using response.write replaces " character with question
mark.
please help


From: S N on
how to print apostrophe character ' and double quote " in asp using
vbscript. my code using response.write replaces " character with inverted
question mark.
please help


From: "Jon Paal [MSMD]" Jon nospam Paal on
'******************************************************************
Function DataPrep(strText)
'
'PURPOSE: prep data text entry
'
'PARAMETERS: strText -- text string to modify
'******************************************************************
If NOT isNull(strText) then

DataPrep = Replace(strText, ";", "")
DataPrep = Replace(DataPrep, "'", "'")
DataPrep = Replace(DataPrep, """", """)
DataPrep = Replace(DataPrep, "<", "&lt;")
DataPrep = Replace(DataPrep, ">", "&gt;")

End if

End Function




"S N" <uandme72(a)yahoo.com> wrote in message news:OCmJVc5hIHA.4076(a)TK2MSFTNGP05.phx.gbl...
> how to print apostrophe character ' and double quote " in asp using vbscript.
> my code using response.write replaces " character with inverted question mark.
> please help
>
>


From: Bob Barrows [MVP] on
Jon Paal [MSMD] wrote:
> '******************************************************************
> Function DataPrep(strText)
> '
> 'PURPOSE: prep data text entry
> '
> 'PARAMETERS: strText -- text string to modify
> '******************************************************************
> If NOT isNull(strText) then
>
> DataPrep = Replace(strText, ";", "")
> DataPrep = Replace(DataPrep, "'", "&apos;")
> DataPrep = Replace(DataPrep, """", "&quot;")
> DataPrep = Replace(DataPrep, "<", "&lt;")
> DataPrep = Replace(DataPrep, ">", "&gt;")
>
> End if
>
> End Function
>
??
What's wrong with

Response.Write Server.HTMLEncode(strText)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"