浏览代码

Fix regression on backtopage

Laurent Destailleur 4 年之前
父节点
当前提交
2fcc0791ac
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      htdocs/core/lib/functions.lib.php

+ 2 - 1
htdocs/core/lib/functions.lib.php

@@ -561,7 +561,8 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
 
 
 	// Sanitizing for special parameters. There is no reason to allow the backtopage parameter to contains an external URL.
 	// Sanitizing for special parameters. There is no reason to allow the backtopage parameter to contains an external URL.
 	if ($paramname == 'backtopage') {
 	if ($paramname == 'backtopage') {
-		$out = preg_replace(array('!(\\\|/)+!', '/^[a-z]*:/'), '', $out);
+		$out = str_replace('\\', '/', $out);
+		$out = preg_replace(array('/^\/\/+/', '/^[a-z]*:/i'), '', $out);
 	}
 	}
 
 
 	// Code for search criteria persistence.
 	// Code for search criteria persistence.