Bug 14069 - [S60]: Plug-in request for execution of JavaScript through NpnGetUrl API not working
Summary: [S60]: Plug-in request for execution of JavaScript through NpnGetUrl API not ...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 523.x (Safari 3)
Hardware: S60 Hardware S60 3rd edition
: P2 Minor
Assignee: Nobody
URL: http://waplabdc.nokia-boston.com/brow...
Depends on:
Reported: 2007-06-11 06:56 PDT by Mahesh Kulkarni
Modified: 2008-04-09 11:39 PDT (History)
1 user (show)

See Also:

Resolve URL bug (772 bytes, patch)
2007-06-11 07:00 PDT, Mahesh Kulkarni
Sachin.Padma: review-
Details | Formatted Diff | Diff
Attached ChangeLog (1.48 KB, patch)
2007-06-14 07:01 PDT, Mahesh Kulkarni
Sachin.Padma: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mahesh Kulkarni 2007-06-11 06:56:09 PDT
A scriptable plug-in can request for a page to load through NPN_GetURL . It can also execute javascript using same API by sending javascript: in the url followed by script.
This API doesnt seems to be responding for simple javascript alert. 

- Use case: 

- Steps to reproduce: 
1) Open the link: http://waplabdc.nokia-boston.com/browser/users/MaheshKK/geturl.html
2) Select flash
2) Click on "Enter" button

- Actual outcome:
Nothing happens after clicking on Enter. 

- Expected outcome:
It should display a alert message "Hello"
Comment 1 Mahesh Kulkarni 2007-06-11 07:00:59 PDT
Created attachment 14935 [details]
Resolve URL bug

When "javascript:" is come in requested URL, browser tries to resolve that URL with base URL. This process encodes special characters (in this case double quotes). Then URL is sent to javascript execution. Javascript engine fails to understand the content as URL has encoded script. 

When "javascript:" is present in the URL, do not resolve URL. Even if javascript makes a requests for a URL then that will be taken care by script engine. 

webKit/plugin plugin_loader

Comment 2 Sachin Padma 2007-06-13 06:56:13 PDT
Comment on attachment 14935 [details]
Resolve URL bug

Please attach changelog
Comment 3 Mahesh Kulkarni 2007-06-14 07:01:05 PDT
Created attachment 15020 [details]
Attached ChangeLog

Attached changeLog. With the fix of not resolving URL
Comment 4 Sachin Padma 2007-06-15 10:36:16 PDT
Comment on attachment 15020 [details]
Attached ChangeLog

r=me. In future please attach changelog to the beginning of the file
Comment 5 Sachin Padma 2007-06-15 10:39:27 PDT
landed in ccb in r23548 and in 3.1m in r23549
Comment 6 Bradley Morrison 2008-04-09 11:39:25 PDT
Bulk closing of all s60 platform bugs. 

Sorry for the noise!