 #= require ./javascript
 
 __char_encode = (char) -> "%#{char.charCodeAt(0).toString(16)}"
-escape_path = (str) -> str.replace(/[^*\-.0-9A-Z_a-z]/g, __char_encode).replace(/\+/g, '%20')
+__escape_path = (str) -> str.replace(/[^*\-.0-9A-Z_a-z]/g, __char_encode).replace(/\+/g, '%20')
 __string_encode = (str) -> _.map(str, (char) -> "&##{char.charCodeAt(0)};" ).join('')
 
 @Ultimate.Helpers.Url =

    extras = _.compact _.map _.string.words('cc bcc body subject'), (item) ->
      option = _.outcasts.delete(html_options, item)
      if option?
        "#{item}=#{escape_path(option)}"
    extras = if _.isEmpty(extras) then '' else '?' + _.string.escapeHTML(extras.join('&'))
    email_address_obfuscated = email_address
    email_address_obfuscated = email_address_obfuscated.replace('@', _.outcasts.delete(html_options, 'replace_at'))   if 'replace_at' of html_options

      else
        Ultimate.Helpers.Tag.content_tag('span', name ? url, html_options, false)
    else
      if block
        @link_to options, html_options, block
      else
        @link_to name, options, html_options

  # TODO tests
  link_to_unless_current: (name, options = {}, html_options = {}, block = null) ->
