diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index c48c0fdf..86d6d1f0 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -12,6 +12,16 @@ require 'gollum/frontend/views/has_page' require File.expand_path '../uri_encode_component', __FILE__ require File.expand_path '../helpers', __FILE__ +# Fix to_url +class String + alias :upstream_to_url :to_url + # _Header => header which causes errors + def to_url + return self if ['_Header', '_Footer', '_Sidebar'].include? self + upstream_to_url + end +end + # Run the frontend, based on Sinatra # # There are a number of wiki options that can be set for the frontend