From 7ab84f9fcf0fa73b4cf911f41680849d040511f2 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Wed, 20 Jul 2005 11:44:40 +0000
Subject: [PATCH] - Patch #26217 by HellRaider: fixed problem <front> setting
 in presence of slashes.

---
 modules/block.module       | 4 ++--
 modules/block/block.module | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/block.module b/modules/block.module
index f19f1d59db61..7ceec94cec65 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -463,8 +463,8 @@ function block_list($region, $regions = array('left' => 0, 'right' => 1, 'all' =
       if ($block['pages']) {
         if ($block['visibility'] < 2) {
           $path = drupal_get_path_alias($_GET['q']);
-          $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/';
-          $page_match = !($block['visibility'] xor preg_match($regexp, $path));
+          $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block['pages'], '/')) .')$/';
+        $page_match = !($block['visibility'] xor preg_match($regexp, $path));
         }
         else {
           $page_match = drupal_eval($block['pages']);
diff --git a/modules/block/block.module b/modules/block/block.module
index f19f1d59db61..7ceec94cec65 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -463,8 +463,8 @@ function block_list($region, $regions = array('left' => 0, 'right' => 1, 'all' =
       if ($block['pages']) {
         if ($block['visibility'] < 2) {
           $path = drupal_get_path_alias($_GET['q']);
-          $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/';
-          $page_match = !($block['visibility'] xor preg_match($regexp, $path));
+          $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block['pages'], '/')) .')$/';
+        $page_match = !($block['visibility'] xor preg_match($regexp, $path));
         }
         else {
           $page_match = drupal_eval($block['pages']);
-- 
GitLab