alexreisner/geocoder — pull request #390 by boone (2013-02-07 18:47:49+00:00)
Title: Improve regular expressions for queries.

Many of the query regular expressions use ^ and $, which permit newlines in Ruby. We can use \A and \z instead. In addition, any address that began with "127" would return true on loopback_ip_address? These issues have been corrected in query.rb with tests.

Note: there are also several other instances of ^ and $ in regexes in the code. As these are mostly related to various provider implementations, I haven't reviewed if using \A and \z would be more appropriate for them.

Thanks!