Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #12320
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Transposing single and double quotes. |
| Date | 2012-03-01 10:18 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <jinbd3$pni$1@dont-email.me> (permalink) |
| References | (2 earlier) <4f4e724b$1@news.broadpark.no> <1404347.V9SEqChMir@PointedEars.de> <XnsA008EEBB54D5Aeejj99@194.109.133.133> <jin2qq$ms8$1@dont-email.me> <XnsA0095AA00AB33eejj99@194.109.133.133> |
2012-03-01 9:54, Evertjan. wrote:
>> Of course HTML parsing rules don’t apply when alert() processes its
>> argument.
>
> Perhaps "of cource" to you, but this is a repeating error made by me and
> many others, while we do know better.
It’s “of course” after understanding, at a very basic level, what HTML
is and what JavaScript is. Practical confusion is a different matter—it
often happens that we forget or overlook things that we surely know
better, but then you should slap on your head and say “of course”!
> And not "of cource", since it would be much nicer if html-parsing of the
> alert() string was done.
No, that would be all wrong. If JavaScript code has been embedded into
an HTML document, then HTML parsing has already been performed when
alert() gets its food. If it has not, then it would be absurd to apply
HTML parsing rules (e.g., when JavaScript code is used in a context that
has nothing to do with HTML).
>> It is “translated” (recognized as an entity reference) when the
>> attribute value is processed by an HTML user agent.
>
> Quot non in casu.
“How many not in [a/the] case”! Does not sound to make sense, whatever
it is intended to relate to.
>>> [chrome and ie9 tested]
>>
>> Not with the code under discussion.
>
> This is the code under discussion in my posting:
>
>>>> onclick="window.alert('Please don\'t click the"Click"
>>>> button again')"
So what does the following document do in your tests?
<!doctype html>
<title>Test</title>
<a onclick=
"window.alert('Please don\'t click the "Click" button again')"
>foo</a>
(I hope your are not referring to the effects of line breaks introduced
by news posting or reading software. It is true that the resident troll
himself might attack such issues in other people’s postings, but you
should know better.)
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 15:04 +0000
Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-02-29 17:27 +0200
Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:17 +0000
Re: Transposing single and double quotes. Scott Sauyet <scott.sauyet@gmail.com> - 2012-02-29 07:28 -0800
Re: Transposing single and double quotes. Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-02-29 16:39 +0100
Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:27 +0000
Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-02-29 18:38 +0000
Re: Transposing single and double quotes. KR <kristian.rasmussen@broadpark.no.spam.com> - 2012-02-29 19:45 +0100
Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-29 19:59 +0100
Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-02-29 22:28 +0000
Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 07:52 +0200
Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 07:54 +0000
Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 10:18 +0200
Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 15:21 +0000
Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-01 18:07 +0200
Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-01 10:30 +0100
Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-01 15:29 +0000
Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-01 22:10 +0100
Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-02 11:02 +0100
Re: Transposing single and double quotes. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-02 13:17 +0100
Re: Transposing single and double quotes. Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-05 10:09 +0100
Re: Transposing single and double quotes. John G Harris <john@nospam.demon.co.uk> - 2012-03-02 16:27 +0000
Re: Transposing single and double quotes. Dr J R Stockton <reply1209@merlyn.demon.co.uk> - 2012-03-02 22:05 +0000
Re: Transposing single and double quotes. "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-03 08:35 +0000
Re: Transposing single and double quotes. "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-02-29 20:47 +0200
Re: Transposing single and double quotes. Swifty <steve.j.swift@gmail.com> - 2012-03-01 07:19 +0000
Re: Transposing single and double quotes. Gene Wirchenko <genew@ocis.net> - 2012-02-29 14:18 -0800
Re: Transposing single and double quotes. Dr J R Stockton <reply1209@merlyn.demon.co.uk> - 2012-03-01 21:55 +0000
csiph-web