Attached is a patch to allow URL fragments to work in internal confirmation pages. E.g.
"internal:node/33#myAnchor" will now properly redirect to "http://yoursite/?q=node/33#myAnchor"
New code starts at line 1889:
elseif (preg_match('/^internal:/', $node->webform['confirmation'])) {
$fragment = null;
$path = preg_replace('/^internal:/', '', $node->webform['confirmation']);
$pos = strrpos($path,'#');
if($pos)
{
$fragment = substr($path,$pos+1);
$path = substr($path,0,$pos);
}
$redirect = array(trim($path), 'sid='. $sid, $fragment);
}
I hope this helps! Please review.
| Comment | File | Size | Author |
|---|---|---|---|
| webform.module.patch | 892 bytes | brice-dupe |
Comments
Comment #1
quicksketchThis was added in #520524: Redirect URL and confirmation message should be two different fields.