A Conversation for Technical Feedback

Ampersand problem

Post 1

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

I need to use an ampersand in a link's TITLE attribute - how?????

The parser complains that any ampersand in there (even the leading ampersand in "&amp") is an illegal use of an ampersand, and I can't use an ENTITY in the middle of another tag. It's part of a site's name, and frankly if I'm going to bother putting the names in I'd like to at least appear to get them right... smiley - geek


Ampersand problem

Post 2

Silly Willy

You need to use the code & (with the semi-colon) and the parser will let it through


Ampersand problem

Post 3

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

Ah, OK, silly me! Will try that now...


Ampersand problem

Post 4

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

Yup, that worked. Fancy the Punctuation Policeman forgetting his semicolon... Ah well, it was my Sunday afternoon off... smiley - biggrin


Ampersand problem

Post 5

MaW

That is embarrassing, isn it?

smiley - laugh


Ampersand problem

Post 6

Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista)

smiley - blush


Ampersand problem

Post 7

Jim Lynn

That's because IE and other browsers are very forgiving, and will accept &amp as a synonym for & even though it's completely correct. (for that matter, they'll cope with & on its own as well.)

We require strict XML, so you can't miss out the ;


Ampersand problem

Post 8

MaW

As you should! As you should!

(that from a person who's planning to check the generated pages of his new website project to see if it validates as XHTML or not)


Key: Complain about this post