strings with quotes in

G

Giles

< input type=text name="PageTitle" id="PageTitle"
value="<%=strPageTitle%>" >

How do I "escape" any quotes, accidental carriage returns etc that are
contained within strPageTitle? Do I have to use a series of replace()
functions, or is there a cunning way that makes it OK?

(Using escape(strPageTitle) fills the box with % signs...)

Thanks in advance
Giles
 
B

Bob Barrows [MVP]

Giles said:
< input type=text name="PageTitle" id="PageTitle"
value="<%=strPageTitle%>" >

How do I "escape" any quotes, accidental carriage returns etc that are
contained within strPageTitle? Do I have to use a series of replace()
functions, or is there a cunning way that makes it OK?

(Using escape(strPageTitle) fills the box with % signs...)

Thanks in advance
Giles
value="<%=server.htmlencode(strPageTitle)%>" >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top