tags:

views:

143

answers:

2

I want to put a colon in an attribute value that is used to display the title of a chart on my webpage.

I have something like: <chart displayname="This is the chart name" resource = "blah blah blah" />

I want the display name to be something like "This: is the chart name"

How can I accomplish this?

Thank you for your help.

If it helps here are the HTML codes of the characters I want to use: &#45; and &#58;

+1  A: 

Colon is not a special character. Just put it in there, it will work.

Ned Batchelder
A: 

If you want to keep your attributes alphanumeric, use the UTF notation instead of the colon:

  displayname="This&#58;My Chart"

Obviously the semicolon and spaces are not alphanumeric, but the above will achieve what I think you are going for.

Anthony