Skip to content

Commit

Permalink
Merge pull request #2482 from ec-europa/release-2.5.136.4
Browse files Browse the repository at this point in the history
Release 2.5.136.4
  • Loading branch information
Fefaine authored Apr 9, 2019
2 parents 413519c + 745f33f commit 0fe23ed
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
9 changes: 4 additions & 5 deletions resources/multisite_drupal_standard.make
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,10 @@ projects[realname][version] = "1.3"
projects[redirect][subdir] = "contrib"
; In order to be able to #1396446 patch the module we need to point to the latest dev commit.
projects[redirect][download][branch] = 7.x-1.x
projects[redirect][download][revision] = add3c695f613fbeec23b7259e59936f60a6b6da6
; Increase size of source field to hold long URLs
; https://www.drupal.org/project/redirect/issues/2057615
; https://webgate.ec.europa.eu/CITnet/jira/browse/NEPT-1943
projects[redirect][patch][] = https://www.drupal.org/files/issues/2018-06-24/redirect-increase-size-fields-to-900-2057615-35.patch
projects[redirect][download][revision] = d5c95c2112f05d1a31c2f10bc921c633110c8a91
; Target URL modified when implementing redirection using Redirect module
; https://webgate.ec.europa.eu/CITnet/jira/browse/NEPT-2399
projects[redirect][patch][] = patches/target-modified-implementing-redirection.patch
; Prevent new redirects from being deleted on cron runs.
; https://www.drupal.org/node/1396446
; https://webgate.ec.europa.eu/CITnet/jira/browse/NEPT-1945
Expand Down
27 changes: 27 additions & 0 deletions resources/patches/target-modified-implementing-redirection.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/redirect.module b/redirect.module
index 5d92399..311e7a7 100644
--- a/redirect.module
+++ b/redirect.module
@@ -1430,6 +1430,8 @@ function redirect_variables() {

function redirect_parse_url($url) {
$original_url = $url;
+ $is_external = url_is_external($url);
+
$url = trim($url, " \t\n\r\0\x0B\/");
$parsed = parse_url($url);

@@ -1456,7 +1458,12 @@ function redirect_parse_url($url) {
}
}

- $url = trim($url, '/');
+ // At this point, a URL with a query or fragment may still have a trailing
+ // slash. Trim the trailing slash from "internal" Drupal paths (and other
+ // local paths).
+ if (!$is_external) {
+ $url = trim($url, '/');
+ }

// Convert to frontpage paths.
if ($url == '<front>') {

0 comments on commit 0fe23ed

Please sign in to comment.