drupal_add_js() has the following code:
// url() generates the prefix using hook_url_outbound_alter(). Instead of
// running the hook_url_outbound_alter() again here, extract the prefix
// from url().
url('', array('prefix' => &$prefix));
In #1183208-86: Remove variable_get('clean_url') and switch to index.php/path pattern for dirty URL support, this technique is expanded to cover a 2nd URL component (script_path), and catch calls this evil and asks for a helper function.
I think a good solution to this might be to add an optional 3rd parameter to url() to return $options, or some other representation of the URL pieces, instead of the URL string.
Comments
Comment #1
Gaelan commentedWorking on this.
Comment #2
Gaelan commentedOops, wrong issue.
Comment #3
wim leersStill a problem today!
Comment #17
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #18
smustgrave commentedClosing this one as outdated as the code mentioned doesn't appear in the repo anymore. If still a valid task please re-open