Solved

Handling Ampersands for SVG

Posted on 2004-08-27
1
277 Views
Last Modified: 2013-11-19
Hello and thanks for viewing my question. I have a database backing an ASP/VBScript web app and have been running into problems when the string values that are read from the DB contain ampersands. The I belive the VBScript thinks the ampersand denotes a concatenation, thereby crashing the system. I haven't really thought too much about it, but the fact that the ASP page is really is an SVG object not a HTML object my have something to do w/ the problem but I doubt it.

I remember running into problems like this when using the DOM, and there was a nice tool where you could specify innerText to avoid confusion with HTML tags in innerHTML, I wanted to know if there is something like this for VBScript in case I run into other special characters other than the ampersand. Please let me know if you should require further explanation or code. Thanks!

-gj
0
Comment
Question by:graphicjunkie
1 Comment
 
LVL 46

Accepted Solution

by:
fritz_the_blank earned 50 total points
ID: 11916424
You could try using SErver.HTMLEncode(strYourString)

That will output the sting rather than evaluate it.

FtB
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now