class Selenium::WebDriver::Remote::Bridge
def escape_css(string)
- See: https://mathiasbynens.be/notes/css-escapes -
def escape_css(string) string = string.gsub(ESCAPE_CSS_REGEXP) { |match| "\\#{match}" } string = "\\#{UNICODE_CODE_POINT + Integer(string[0])} #{string[1..]}" if string[0]&.match?(/[[:digit:]]/) string end