summaryrefslogtreecommitdiffstats
path: root/app/helpers/wiki_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/wiki_helper.rb')
-rw-r--r--app/helpers/wiki_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb
index 74bec7422..a6e38a12a 100644
--- a/app/helpers/wiki_helper.rb
+++ b/app/helpers/wiki_helper.rb
@@ -21,14 +21,14 @@ module WikiHelper
def wiki_page_options_for_select(pages, selected = nil, parent = nil, level = 0)
pages = pages.group_by(&:parent) unless pages.is_a?(Hash)
- s = ''
+ s = ''.html_safe
if pages.has_key?(parent)
pages[parent].each do |page|
attrs = "value='#{page.id}'"
attrs << " selected='selected'" if selected == page
- indent = (level > 0) ? ('&nbsp;' * level * 2 + '&#187; ') : nil
+ indent = (level > 0) ? ('&nbsp;' * level * 2 + '&#187; ') : ''
- s << "<option #{attrs}>#{indent}#{h page.pretty_title}</option>\n" +
+ s << content_tag('option', (indent + h(page.pretty_title)).html_safe, :value => page.id.to_s, :selected => selected == page) +
wiki_page_options_for_select(pages, selected, page, level + 1)
end
end