You are not logged in.
Xinha seems to not like having escaped quotes within attributes, like so:
<img src='foo' tag='foo\'bar' />
If I type that in Text Mode, then go to WYSIWYG and back to text mode again, it becomes this:
<img src='foo' tag='foo\' />
Which part of the Xinha source code is responsible for this? I've been debugging furiously and I just cannot find where the change occurs.
Also, why are my apostrophes always changed to quotes? I can't find the code for that either.
Offline
Your example is completely incorrec html, of course the browser screws it up for you, it doesn't know what to do with it.
Firstly, you should be using double quotes. Secondly you do not escape by using backslashes anywhere in HTML or XML for that matter.
Use ' as the proper HTML entity "escape sequence" for ' if you must use single quotes to quote attributes.
James Sleeman
Offline
Thanks, that clears it up. I guess I'm too used to other programming languages.
One thing. In an HTML tag attribute, how do I differentiate between a quote and the sequence &# 34; if I have to write quotes as &# 34;? That's why I like using slashes to escape characters, you always know what you're getting. To be more specific, suppose I have some text I want to store in an attribute:
This is a quote: ". This is some text: & #34; .
If I have to change the quote to & #34;, I won't be able to change back correctly.
EDIT:
Nevermind, I'll just require that the &# ; sequences are considered special, so if someone actually wants to have "ampersand hash thirty four" in the text, they'll have to use the &# sequence for the ampersand or something.
Last edited by benforbes (2005-11-21 19:31:10)
Offline