Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nesting quotes in tag attributes

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

Are there a set of concrete rules (i.e. in the specifications or somewhere) for when tag attributes allowed to nest double quotes within double quotes?

For example, this does *NOT* work...



...I must change either the outer or the inner set of quotes to single quotes for it to work. In other words, no nesting of double quotes is allowed.

However, this DOES work...



...nesting of double quotes IS allowed here.

So, what are the rules? It doesn't seem to me that the tag author has any control over it. So it must be a container specification, right?

Thanks!
John
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by JohnWilliam Fitz:





confusing?



...nesting of double quotes IS allowed here.

So, what are the rules? It doesn't seem to me that the tag author has any control over it. So it must be a container specification, right?



i dont think so. see it is normal that how compiler understand that where is the " starting and ending ?
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
confusing?


Sorry, the tag should have read...




see it is normal that how compiler understand that where is the " starting and ending ?


But the container's behaviour is different in the two examples. In the first example, the container sees the second double quote in the attribute value as closing the string and then assumes what comes next is the next attribute. So I must make the inner quotes single quotes for it to be interpreted correctly.

But in the second example I gave, why doesn't the compiler or container see the second double quote as closing the string the way it did in the first example? This behaviour is documented somewhere, no?

John
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry. The smiley should be a colon followed by a p. That is truly frustrating that even when I wrap a block in [code] tags it still converts characters to smileys.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can still use HTML Special Entities for the double quotes around member.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by JohnWilliam Fitz:
That is truly frustrating that even when I wrap a block in [code] tags it still converts characters to smileys.


in this case,when you post your code please disable the smilies option which is below your UBB code option
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can still use HTML Special Entities for the double quotes around member.


Thanks Christopher. I will read that.

Will the exam try to test my knowledge of what situations allow nested double quotes in tag attribute values? I feel shaky on what's legit and not.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will the exam try to test my knowledge of what situations allow nested double quotes in tag attribute values?

No, I don't think so.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic