From 7f2e883e124b5577e87e209159a63906bafa7669 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Thu, 2 Jul 2009 11:02:05 -0500 Subject: [PATCH] Slashes in Page Names Make it possible to change the name of a page, whose currrent name contains a forward slash. (Reported boy Toby Bartels) --- app/views/wiki/edit.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index 2c6f136c..c981e0db 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -48,7 +48,7 @@ function toggleVisibility() { span.style.display ='none'; document.getElementById('new_name').value = "<%= escape_javascript(@page.name) %>"; var content = document.getElementById('content').value - document.getElementById('content').value = content.replace(/\[\[!redirects <%= Regexp.escape(@page.name) %>\]\]\n/, '') + document.getElementById('content').value = content.replace(/\[\[!redirects <%= Regexp.escape(@page.name).gsub('/', '\\/') %>\]\]\n/, '') } else span.style.display ='inline'