From ac637c3f81ce810ff729098fa927047481eb2342 Mon Sep 17 00:00:00 2001
From: yorirou <yorirou@372872.no-reply.drupal.org>
Date: Sun, 15 Jul 2012 09:32:47 +0200
Subject: [PATCH] Issue #1461236 by Yorirou: Fixed Trailing space in the menu
 path could cause menu rebuild failure.

---
 plugins/views_plugin_display_page.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/views_plugin_display_page.inc b/plugins/views_plugin_display_page.inc
index 5c4146315a2e..fd03d02614b2 100644
--- a/plugins/views_plugin_display_page.inc
+++ b/plugins/views_plugin_display_page.inc
@@ -552,9 +552,8 @@ function options_validate(&$form, &$form_state) {
           form_error($form['path'], t('"%" may not be used for the first segment of a path.'));
         }
 
-        // automatically remove '/' from path.
-        $form_state['values']['path'] = trim($form_state['values']['path'], '/');
-
+        // automatically remove '/' and trailing whitespace from path.
+        $form_state['values']['path'] = trim($form_state['values']['path'], '/ ');
         break;
       case 'menu':
         $path = $this->get_option('path');
-- 
GitLab