# File escape.rb, line 394 def rfc2822_quoted_string(str) if /\A(?:#{RFC2822_FWS}?[\x01-\x09\x0b\x0c\x0e-\x7f])*#{RFC2822_FWS}?\z/o !~ str raise ArgumentError, "not representable in quoted-string of RFC 2822: #{str.inspect}" end s = '"' + str.gsub(/["\\]/, '\\\\\&') + '"' MIMEParameter.new_no_dup(s) end