Created
May 23, 2012 12:16
-
-
Save eoftedal/2774937 to your computer and use it in GitHub Desktop.
Based on @homakov's work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = "javascript:evil();\nhttp://www.vg.no" | |
if a =~ /^https?/ then | |
puts "This is a safe url starting with http or https" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://bugs.ruby-lang.org/issues/6472