Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

safe-quote of typing allows for typing of quotation marks

  • Loading branch information...
commit 1a7f18f9d9a79256bf154cf14788d936515a582f 1 parent 9a0616a
@jashmenn jashmenn authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 lib/castanaut/ext/string.rb
  2. +1 −1  lib/castanaut/movie.rb
View
5 lib/castanaut/ext/string.rb
@@ -0,0 +1,5 @@
+class String
+ def safe_quote
+ self.gsub(/['"]/, '\\\"')
+ end
+end
View
2  lib/castanaut/movie.rb
@@ -156,7 +156,7 @@ def drag(*options)
def type(str, opts = {})
opts[:speed] = 50 unless opts[:speed].nil?
- compatible_call :type, str, opts
+ compatible_call :type, str.safe_quote, opts
end
# TODO - determine which #type to use
Please sign in to comment.
Something went wrong with that request. Please try again.