Overview Description: The following line of html does not work with 5.0 - it sets up a button for calling view-source. <form><INPUT type=button value='Show page source' onclick= 'window.location = "view-source:" + window.location.href'> </form> Steps to Reproduce: 1.) Go to above site for test case Actual Results: nothing happens Expected Results: source should be displayed Build Date & Platform Bug Found: NT 2000060108
sounds like a dup. *** This bug has been marked as a duplicate of 41090 ***
There is a slight difference here in that clicking the button results in nothing, not even a blank page. Talked over with R Ginda who suggests assigning to DOM and that this could be a problem with window.location.href not working in above example. re-opening
re-assigning to jst
The DOM is not responcible for this, mozilla doesn't AFAIK even know what view-source: means yet, should be quite easy to implement in the docshell/uriloader tho, just pass on the view-source command to the document/parser...
Docshell can be modified to check if the protocol of the URI it has been passed was of type view-source: and then set the content viewer appropriately. It does rely on the nsURI parser being able to cope with URLS in this form view-source:http://www.blah.com/foo#bar A problem for someone else. The chrome also needs updating so that if someone types view-source: into the address bar, that a new window is created to show the source code in, rather than replacing the existing content.
CC'ing Rick & Jud
Created attachment 9833 [details] [diff] [review] Patch that shows the quick and dirty way to fix the bug
Created attachment 10512 [details] [diff] [review] Please review - Slightly revised hack to enable support for view-source: pseudo-protocol
Committed as part of yesterday's general API cleanup