lib/geminabox/server.rb in geminabox-0.13.9 vs lib/geminabox/server.rb in geminabox-0.13.10

- old
+ new

@@ -305,9 +305,18 @@ def combined_gem_list GemListMerge.from(local_gem_list, remote_gem_list) end helpers do + def href(text) + escaped_text = Rack::Utils.escape_html(text) + if escaped_text.start_with?('http://') || escaped_text.start_with?('https://') + escaped_text + else + '#' + end + end + def h(text) Rack::Utils.escape_html(text) end def spec_for(gem_name, version, platform = default_platform)