By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,206 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

& special characters

P: n/a
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.

Im always getting validator errors due to the title tag contains
é symbol and it says it s 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==4 && req.status == 200)
{
stSource = req.responseText;
req2.onreadystatechange =
processFinal;
req2.open("POST", stUrl, false);
req2.setRequestHeader("Content-type",
"application/x-www-form-urlencoded");
req2.send("fragment=" + stSource);
}
}

May 29 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
dnevado wrote:
I´m always getting validator errors due to the title tag contains
&eacute; symbol and it says it ´s not terminated correctly.


I'm guessing you need to double-escape the é.

That is: &amp;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

May 29 '06 #2

P: n/a
Do I have to encode "&" even if I am sending data with POST method?. In
W3 faq, its said you should do it with GET operations included in the
querystring.

Ill try it.

Thanks Toby.

May 29 '06 #3

P: n/a
On Mon, 29 May 2006, Toby Inkster wrote:
dnevado wrote:
Im always getting validator errors due to the title tag contains
&eacute; 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
May 29 '06 #4

P: n/a
On 29 May 2006 dn*****@gmail.com wrote:
Im always getting validator errors due to the title tag contains
&eacute; symbol and it says it s not terminated correctly.


Speaking of special characters ...
An acute accent () is no apostrophe (')!
http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html

Unfortunately, acute () and grave (`) accents have largely
replaced the apostrophe (') in continental Europe due to
ill-designed keyboard layouts. Examples:
http://www.workingmansdeath.com/imag...kinoplakat.gif
http://www.moosburg.org/design/apo.html

May 29 '06 #5

P: n/a
Andreas Prilop wrote:
On 29 May 2006 dn*****@gmail.com wrote:
Im always getting validator errors due to the title tag contains
&eacute; symbol and it says it s not terminated correctly.


Speaking of special characters ...
An acute accent () is no apostrophe (')!
http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html

Unfortunately, acute () and grave (`) accents have largely
replaced the apostrophe (') in continental Europe due to
ill-designed keyboard layouts. Examples:
http://www.workingmansdeath.com/imag...kinoplakat.gif


That one looks like it could be a perfectly good apostrophe character in
the font that was used for the poster.
May 29 '06 #6

P: n/a
On Mon, 29 May 2006, Harlan Messinger wrote:
http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html
Unfortunately, acute () and grave (`) accents have largely
replaced the apostrophe (') in continental Europe due to
ill-designed keyboard layouts. Examples:
http://www.workingmansdeath.com/imag...kinoplakat.gif


That one looks like it could be a perfectly good apostrophe character in
the font that was used for the poster.


Oh no! The basis for this "stencil font" is Helvetica, as can be
seen from the letters "G" and "R".
Visit http://store.adobe.com/type/browser/P/P_1424.html
for glyphs of apostrophe (= right single quote) and accents
in Helvetica.

Actually, http://www.workingmansdeath.com/images/head_about.gif
shows a correct apostrophe.

May 30 '06 #7

P: n/a
Andreas Prilop wrote:
On Mon, 29 May 2006, Harlan Messinger wrote:
http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html
Unfortunately, acute () and grave (`) accents have largely
replaced the apostrophe (') in continental Europe due to
ill-designed keyboard layouts. Examples:
http://www.workingmansdeath.com/imag...kinoplakat.gif That one looks like it could be a perfectly good apostrophe character in
the font that was used for the poster.


Oh no! The basis for this "stencil font" is Helvetica, as can be
seen from the letters "G" and "R".


You think so? The Helvetica "R" has a dainty table-leg (don't ask me to
name the style!) serif that the "R" in the poster lacks.
Visit http://store.adobe.com/type/browser/P/P_1424.html
for glyphs of apostrophe (= right single quote) and accents
in Helvetica.

Actually, http://www.workingmansdeath.com/images/head_about.gif
shows a correct apostrophe.


Indeed, it's different.
May 30 '06 #8

P: n/a
Aus den Werken von Harlan Messinger:
Andreas Prilop wrote:
On Mon, 29 May 2006, Harlan Messinger wrote:
http://www.cl.cam.ac.uk/~mgk25/ucs/apostrophe.html
Unfortunately, acute () and grave (`) accents have largely
replaced the apostrophe (') in continental Europe due to
ill-designed keyboard layouts. Examples:
http://www.workingmansdeath.com/imag...kinoplakat.gif
That one looks like it could be a perfectly good apostrophe
character in the font that was used for the poster.


Oh no! The basis for this "stencil font" is Helvetica, as can be
seen from the letters "G" and "R".


You think so? The Helvetica "R" has a dainty table-leg (don't ask me
to name the style!) serif that the "R" in the poster lacks.


Hard to tell at that resolution, but I think you're right in that
the right leg of the R has something un-helvetica-ish. Also, the
K is more Univers-like. But I agree with Andreas P. in that the
apostrophe is an accent aigu, no doubt about that.

Andreas

May 30 '06 #9

P: n/a
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

May 31 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.