Giorgio Maone wrote:Yes there is, but I should patch yet another browser function (fragile!) just to support this very rare use case.
To defend this use case, the ability to process text from pages with parameterized javascript bookmarklets, transform it and make arbitrary requests based on it, is a pretty powerful extensibility mechanism, there is value in preserving it. Sure it's an advanced feature, but so is NS for the most part, so it's NS users who are more likely to use and miss it.
Giorgio Maone wrote:Address bar JavaScript (which we don't want to allow) is "javascript: url opening from privileged code", and at that level it cannot be discriminated anymore.
I debugged it a bit. It looks like you are patching loadURI. If you patch one "level" lower, loadURIWithFlags, you should be able to:
- intercept the SmartSearch load(openUILinkIn->openLinkIn->loadOneTab->addTab->loadURIWithFlags), fixing this issue
- know when the nav is user typed javascript (javascript: url and LOAD_FLAGS_DISALLOW_INHERIT_OWNER flag set)
- here's a nice bonus, you could optionally strip/ignore the LOAD_FLAGS_DISALLOW_INHERIT_OWNER flag, overriding the 6.0 ban on user typed javascript: this would be a welcome feature apart from this issue
Giorgio Maone wrote:Any PlacesUIUtils method which calls checkURLSecurity() will do.
I don't think openNodeIn (or anything else there) supports parameterized invocation, does it? Doesn't look like that's an option.