lib/nv/niconico/helper.rb in nv-1.0.1 vs lib/nv/niconico/helper.rb in nv-1.2.1
- old
+ new
@@ -2,7 +2,11 @@
module Helper
def mylist?(url)
return true if url =~ /mylist\/\d+/
false
end
+
+ def escape_string(str)
+ str.gsub(/[\/\\?*:|><]/) {|m| [m.ord + 65248].pack('U*')}
+ end
end
end