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'