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)
This commit is contained in:
Jacques Distler 2009-07-02 11:02:05 -05:00
parent a049d27222
commit 7f2e883e12

View file

@ -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'