diff --git a/app/models/page.rb b/app/models/page.rb index 84deefa0..1f714101 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -85,6 +85,9 @@ class Page @web.make_link(author, nil, options) end + def url + CGI.escape(self.name) + end private diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index 909918e9..386676f0 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -8,7 +8,7 @@ <%= render("#{@web.markup}_help") if @web %> -
+

@@ -16,7 +16,7 @@ as - | Cancel (unlocks page) + | Cancel (unlocks page)

diff --git a/app/views/wiki/list.rhtml b/app/views/wiki/list.rhtml index 77a09b85..dddd499a 100644 --- a/app/views/wiki/list.rhtml +++ b/app/views/wiki/list.rhtml @@ -17,7 +17,7 @@ <% end %> <% if @web.count_pages %> @@ -51,7 +51,7 @@ <% end %> diff --git a/app/views/wiki/locked.rhtml b/app/views/wiki/locked.rhtml index e3590afd..c878233f 100644 --- a/app/views/wiki/locked.rhtml +++ b/app/views/wiki/locked.rhtml @@ -8,12 +8,12 @@

<%= link_to 'Edit the page anyway', - {:web => @web_name, :action => 'edit', :id => @page.name, :params => {'break_lock' => '1'} }, + {:web => @web_name, :action => 'edit', :id => @page.url, :params => {'break_lock' => '1'} }, {:accesskey => 'E'} %> <%= link_to 'Cancel', - {:web => @web_name, :action => 'show', :id => @page.name}, + {:web => @web_name, :action => 'show', :id => @page.url}, {:accesskey => 'C'} %> diff --git a/app/views/wiki/page.rhtml b/app/views/wiki/page.rhtml index b8cb46f8..cbccc582 100644 --- a/app/views/wiki/page.rhtml +++ b/app/views/wiki/page.rhtml @@ -27,14 +27,14 @@