X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7ad58d1411289ad241a49abb87e414ff13b60173..bd8713f42b4a5196cf89e8270c57322742ba1f5e:/app/helpers/application_helper.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 81ff1e95b..000677646 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -9,14 +9,6 @@ module ApplicationHelper end end - def html_escape_unicode(text) - chars = ActiveSupport::Multibyte::Unicode.u_unpack(text).map do |c| - c < 127 ? c.chr : "&##{c.to_s};" - end - - return chars.join("") - end - def rss_link_to(*args) return link_to(image_tag("RSS.gif", :size => "16x16", :border => 0), Hash[*args], { :class => "rsssmall" }); end @@ -95,4 +87,12 @@ module ApplicationHelper end end end + + def dir + if dir = params[:dir] + dir == "rtl" ? "rtl" : "ltr" + else + I18n.t("html.dir") + end + end end