VB/ASP problem - HTML strings in ASP
-
Hi everyone, In the ASP page, I store the output (in the form of html strings) from the rich-text editor in a database; when time comes, I retrieve the required HTML string (I use VB as a server-side language) (
htmlCode
variable.) The I wish to pass thishtmlCode
to some JavaScript function:<body onload="populateWithHTML('<%=htmlCode%>')">
BUT! Here is the problem. This html string can contain " (quote) and ' (apostrophe) symbols, that break the resulting HTML. How should I fix this? Thank you much in advance!
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
-
Hi everyone, In the ASP page, I store the output (in the form of html strings) from the rich-text editor in a database; when time comes, I retrieve the required HTML string (I use VB as a server-side language) (
htmlCode
variable.) The I wish to pass thishtmlCode
to some JavaScript function:<body onload="populateWithHTML('<%=htmlCode%>')">
BUT! Here is the problem. This html string can contain " (quote) and ' (apostrophe) symbols, that break the resulting HTML. How should I fix this? Thank you much in advance!
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
-
server.htmlencode is a .NET method; is there a way to make it in a ordinary (non-.NET) VB and ASP?
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
-
server.htmlencode is a .NET method; is there a way to make it in a ordinary (non-.NET) VB and ASP?
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
-
Oops! Thanks a lot. BTW, is there a server.HTMLDecode method?
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
-
Oops! Thanks a lot. BTW, is there a server.HTMLDecode method?
------------------------- Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).