File: escape.rb

package info (click to toggle)
ruby-activeldap 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 1,588 kB
  • sloc: ruby: 18,143; sh: 12; makefile: 5
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