Active
Project:
Path redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2011 at 09:38 UTC
Updated:
7 Sep 2011 at 09:38 UTC
I'm not sure but I guess path_redirect should strip a leading slash of the redirect url. Something like:
// Strip leading slashes.
$form_state['values']['redirect'] = preg_replace('%^/+%','', $form_state['values']['redirect']);
What do you think? I could create a patch for this, but first I want some feedback.
May we also strip the base_url (before stripping the slash)?
global $base_url;
// Strip leading base_url.
$form_state['values']['redirect'] = preg_replace('%^' . preg_quote($base_url) . '%','', $form_state['values']['redirect']);