473,323 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

strings with quotes in

< 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
Apr 3 '07 #1
1 1268
Giles wrote:
< 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)%>" >
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Apr 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: sinister | last post by:
The examples in the online manual all seem to use double quotes, e.g. at http://us3.php.net/preg_replace Why? (The behavior is different with single quotes, and presumably simpler to...
4
by: beliavsky | last post by:
The code for text in open("file.txt","r"): print text.replace("foo","bar") replaces 'foo' with 'bar' in a file, but how do I avoid changing text inside single or double quotes? For making...
6
by: Frank | last post by:
I spent over an hour on the Internet & MSDN looking for an answer that worked for this problem. Lots of answers, none work. It's time to post a question. Using: VB6, ADO, MS Jet 4.0 How do...
2
by: sparks | last post by:
ok I was trying to do something real simple I thought Me.Clinic.DefaultValue = Me.Clinic.Value I got error either ! or . misused or not found...something like that I thought ok how can you not...
6
by: Dave | last post by:
I'm struggling with something that should be fairly simple. I just don't know the regext syntax very well, unfortunately. I'd like to parse words out of what is basically a boolean search...
5
by: Micha³ Gancarski | last post by:
Hello! How do one unescape strings prepared with pg_escape_string() ? stripslashes() will not work because both these functions are not completely compatible. Thank you all in advance --...
0
NeoPa
by: NeoPa | last post by:
Background Whenever code is used there must be a way to differentiate the actual code (which should be interpreted directly) with literal strings which should be interpreted as data. Numbers don't...
17
by: john | last post by:
All: I'm a long-time developer, new to PHP.... Is there an idiom used in PHP to construct SQL statments from $_POST data? I would guess that in many applications, the data read from $_POST...
4
by: Michael Yanowitz | last post by:
Hello: If I have a long string (such as a Python file). I search for a sub-string in that string and find it. Is there a way to determine if that found sub-string is inside single-quotes or...
1
by: philmasterplus | last post by:
When JavaScripting, I've often seen strings wrapped with single- quotes: ---------------------------------------------------------------- var language = 'English';...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.