Escaping HTML in VB 
Author Message
 Escaping HTML in VB

We are maintaing some code. This code (Visual Basic COM component) creates
HTML tags using values retireved from the database. Is there a component out
there that would assist in escaping HTML characters such as &, and so forth?
Here is an example of this code:

"<option value=" & Trim(Str(rstRS.Fields("ValiPk").Value)) & strSelected &
">" & Trim(rstRS.Fields("ValiDescription").Value) & "</option>"

We are using VB 6.0.

Thanks,

Michal Dorsett



Sun, 30 Nov 2003 00:54:09 GMT  
 Escaping HTML in VB
You can use Server.HTMLEncode

You have several ways of using ASP objects in VB, the easiest is to
create a method OnPageStart


Quote:
> We are maintaing some code. This code (Visual Basic COM component) creates
> HTML tags using values retireved from the database. Is there a component out
> there that would assist in escaping HTML characters such as &, and so forth?
> Here is an example of this code:

> "<option value=" & Trim(Str(rstRS.Fields("ValiPk").Value)) & strSelected &
> ">" & Trim(rstRS.Fields("ValiDescription").Value) & "</option>"

> We are using VB 6.0.

> Thanks,

> Michal Dorsett



Sun, 30 Nov 2003 19:50:50 GMT  
 Escaping HTML in VB
Hi,

Have a look at this VB6 code:
http://www.planet-source-code.com/xq/ASP/txtCodeId.23162/lngWId.1/qx/...
pts/ShowCode.htm


Quote:
> We are maintaing some code. This code (Visual Basic COM component) creates
> HTML tags using values retireved from the database. Is there a component
out
> there that would assist in escaping HTML characters such as &, and so
forth?
> Here is an example of this code:

> "<option value=" & Trim(Str(rstRS.Fields("ValiPk").Value)) & strSelected &
> ">" & Trim(rstRS.Fields("ValiDescription").Value) & "</option>"

> We are using VB 6.0.

> Thanks,

> Michal Dorsett



Mon, 01 Dec 2003 20:16:50 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. escape Javascript equivalant in VBA for URL Escape Sequences

2. Escaping Characters in VB

3. How to Convert Escape Characters from C# to VB.NET

4. Escape sequence in VB Strings (and Characters)

5. Using HP Printer Escape Sequences (aka Printer Passthrough Codes) in VB.Net

6. escape characters in VB?

7. escape and VB

8. VB 4.0 16 bit or 32 bit Escape Key

9. Printer commands/escapes in VB

10. Are there Escape Chars in VB?

11. javascript escape() in VB

12. Sending Escape Seq. from VB

 

 
Powered by phpBB® Forum Software