|
Posted by dnevado on May 29, 2006, 6:48 am
Please log in for more thread options
Hi,
I have developed a javascript script which sends some html code to w3
validator service through xmlHttpRequest interface in IE. I simply
request a page, take responseText property
and send it to w3 with fragment parameter specified. It works as if you
fill the textarea out and press Check button.
I=B4m always getting validator errors due to the title tag contains
é symbol and it says it =B4s not terminated correctly.
(Error Line 189 column 20: end tag for "TITLE" omitted, but its
declaration does not permit this.
<title>Biblioteca T
You forgot to close a tag, or
you used something inside this tag that was not allowed, and the
validator is complaining that the tag should be closed before such
content can be allowed.)
has anybody experienced with this?. Any charset feature, header or
something like that missing?
Thanks.
function processReqChange()
{
var stSource;
if (req.readyState=3D=3D4 && req.status =3D=3D 200)
{
stSource =3D req.responseText;
req2.onreadystatechange =3D
processFinal;
req2.open("POST", stUrl, false);
req2.setRequestHeader("Content-type",
"application/x-www-form-urlencoded");
req2.send("fragment=3D" + stSource);=20
}
}
|
|
Posted by Toby Inkster on May 29, 2006, 7:25 am
Please log in for more thread options
dnevado wrote:
> I´m always getting validator errors due to the title tag contains
> é symbol and it says it ´s not terminated correctly.
I'm guessing you need to double-escape the é.
That is: &eacute;
That can often be a problem when one script calls another, which calls
another and so forth.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
|
|
Posted by dnevado on May 29, 2006, 9:14 am
Please log in for more thread options
Do I have to encode "&" even if I am sending data with POST method?. In
W3 faq, it=B4s said you should do it with GET operations included in the
querystring.
I=B4ll try it.
Thanks Toby.
|
|
Posted by Alan J. Flavell on May 29, 2006, 9:25 am
Please log in for more thread options
On Mon, 29 May 2006, Toby Inkster wrote:
> dnevado wrote:
>
> > I´m always getting validator errors due to the title tag contains
> > é symbol and it says it ´s not terminated correctly.
>
> I'm guessing you need to double-escape the é.
I'd be happier to see an actual test case than to offer such an
immediate diagnosis. There are at least three issues that might be
involved in such a situation:
1. HTML-encoding the data for putting into HTML markup
2. Form-URL-encoding data for submitting forms
3. Proper representation of characters in Javascript source text.
> That can often be a problem when one script calls another, which
> calls another and so forth.
But not if the programmers understand what they're doing, and have
applied the correct encoding schemes at each stage of their process!
And when they fail to do that, it often results in a potential
security compromise, and the first thing they know about it is when
their HTML starts getting edited for them by intruders (I've seen that
happen in phpwiki) or even being used as a mailing gateway for
spamming, virus distribution, or both.
So this isn't an issue to be taken lightly. In general, it needs a
proper security review, and understanding what kind of encoding to
apply at each stage. IMHO, anyway.
best
|
|
Posted by Toby Inkster on May 31, 2006, 4:00 am
Please log in for more thread options
Alan J. Flavell wrote:
> Toby Inkster wrote:
>
>> I'm guessing you need to double-escape the é.
>> That can often be a problem when one script calls another, which
>> calls another and so forth.
>
> But not if the programmers understand what they're doing, and have
> applied the correct encoding schemes at each stage of their process!
Very true, but all the same, it's often the problem.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
|
| Similar Threads | Posted | | Special characters used in Excel | January 28, 2005, 4:29 am |
| Rendering "special characters" and html validation | February 28, 2005, 3:16 am |
| special pop-up | October 7, 2007, 1:50 pm |
| What special character notation is this | October 22, 2004, 5:07 pm |
| number or name for special character | November 2, 2004, 2:36 am |
| tings that I don't understand [was: special pop-up] | October 10, 2007, 5:13 pm |
| UTF-8 and Latin-1 characters | July 11, 2004, 10:04 pm |
| UTF-8 garbage characters | October 1, 2004, 1:34 am |
| UTF-8 garbage characters | May 27, 2005, 1:19 pm |
| Accented characters | March 13, 2008, 1:37 am |
|