M
msoliver
I've run into a rather simple bug with the XMLHttpRequest object that
is exposed in FF, Chrome, and IE for AJAX calls. If I have the
following on a web page (anywhere):
<input type="text" value="<Test"/>
then the XMLHttpRequest send will not work. The server never sees the
request. I've also tried Unicode-based encoding, <. If instead,
the tag is this:
<input type="text" value="< Test"/>
All is well. Putting the space between the entity and a following
character makes the difference. The server callback works.
So, my question is: what's the workaround for this? How do I put the
"<" character as part of the value attribute of a <input> control?
Putting a space between the escaped < and other characters seems like
a huge hack.
I've verified that this is a bug with IE as well as Firefox and Chrome
- also verfied that this is unrelated to the AJAX implementation since
I tried it on a variety of different server-side environments. This
appears to be a client-side browser error.
Seems like a fundamental syntactical error here that is messing up
XMLHttpRequest. Any insight would be appreciated.
Thanks,
Mike Oliver
is exposed in FF, Chrome, and IE for AJAX calls. If I have the
following on a web page (anywhere):
<input type="text" value="<Test"/>
then the XMLHttpRequest send will not work. The server never sees the
request. I've also tried Unicode-based encoding, <. If instead,
the tag is this:
<input type="text" value="< Test"/>
All is well. Putting the space between the entity and a following
character makes the difference. The server callback works.
So, my question is: what's the workaround for this? How do I put the
"<" character as part of the value attribute of a <input> control?
Putting a space between the escaped < and other characters seems like
a huge hack.
I've verified that this is a bug with IE as well as Firefox and Chrome
- also verfied that this is unrelated to the AJAX implementation since
I tried it on a variety of different server-side environments. This
appears to be a client-side browser error.
Seems like a fundamental syntactical error here that is messing up
XMLHttpRequest. Any insight would be appreciated.
Thanks,
Mike Oliver