From cecbfb8e4c8c3265a9d9222d7dadeb11ebdd034c Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 12 Oct 2016 22:25:04 +0200 Subject: [PATCH 1/1] check if query is valid unicode string --- lib/Geocode.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Geocode.php b/lib/Geocode.php index b5f0c74f..c99a4cf7 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -773,6 +773,9 @@ class Geocode } $sQuery = $this->sQuery; + if (!preg_match('//u', $sQuery)) { + userError("Query string is not UTF-8 encoded."); + } // Conflicts between US state abreviations and various words for 'the' in different languages if (isset($this->aLangPrefOrder['name:en'])) { -- 2.39.5