File: escape.rb

package info (click to toggle)
ruby-activeldap 4.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,524 kB
  • ctags: 1,815
  • sloc: ruby: 17,656; makefile: 15
file content (12 lines) | stat: -rw-r--r-- 212 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
module ActiveLdap
  module Escape
    module_function
    def ldap_filter_escape(str)
      str.to_s.gsub(/\*/, "**")
    end

    def ldap_filter_unescape(str)
      str.to_s.gsub(/\*\*/, "*")
    end
  end
end