good news: nspluginviewer HTTP POST Support
David Faure
david at mandrakesoft.com
Tue Nov 5 21:19:22 GMT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 05 November 2002 21:38, Till Krech wrote:
> First, a small addition to your patch. At least when called from the plugin,
> the javascript url is urlencoded because once on the way a KURL is made from
> a QString. Therefore, my version looks like this:
>
> + if ( urlStr.find( QString::fromLatin1( "javascript:" ), 0, false ) == 0 ) {
> + QString script = KURL::decode_string( urlStr.right( urlStr.length() -
> 11 ) );
> + executeScript( script );
> + return;
This looks consistent with slotRedirect...... But it also looks unnecessarily obfuscated:
wouldn't url.path() do the job? It should both remove the protocol and decode the string.
> Second. Can a javascript: url in any case return something?
Yes. I've seen it many times.
For instance, try
<script>var a='Hello world';</script>
<iframe src="javascript:a"></iframe>
> A javascript handler like onclick can (true or false) and it means wether the
> normal link target is executed or not.
Yes.
> But if I have
> <a href="javascript:sayHelloWorld()"> it does not make much sense.
I thought so too... but try this in mozilla (and IE probably too) :
<script>var a='Hello world';</script>
<a href="javascript:a">click here</a>
Yes, when you click the link, it _replaces_ the current page with the html
returned by the javascript code. I guess it's the equivalent of
document.write(result_of_javascript_eval), which does the same thing.
We don't handle this case yet - that's the case that needs code like
the one in requestFrame().
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9yDXa72KcVAmwbhARAjJcAKCpk8mHhy7T3aoRnh0MteBhJttSBACgiFvT
XjwsdCOalrwnnXquhcfSLPg=
=DtiO
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list