Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2009-06-21 00:41:35 -05:00
commit 73f15777a0

View file

@ -46,7 +46,7 @@ function toggleVisibility() {
var span = document.getElementById('title_change');
if (span.style.display =='inline') {
span.style.display ='none';
document.getElementById('new_name').value = "<%= @page.name %>";
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/, '')
}
@ -55,9 +55,9 @@ function toggleVisibility() {
}
function addRedirect(){
if (document.getElementById('new_name').value != "<%= @page.name %>" ) {
if (document.getElementById('new_name').value != "<%= escape_javascript(@page.name) %>" ) {
var content = document.getElementById('content');
content.value = '[[!redirects <%= @page.name %>]]\n' + content.value
content.value = '[[!redirects <%= escape_javascript(@page.name) %>]]\n' + content.value
}
}