diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-01-03 00:43:13 +0100 |
---|---|---|
committer | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-01-03 00:43:13 +0100 |
commit | 50435729ca8d8f49d196ad0d6fe9241ac637a020 (patch) | |
tree | e2677a8353a36b59cb548c5c9bef073de7af4d54 | |
parent | have fun (diff) | |
download | itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar.gz itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar.bz2 itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar.lz itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar.xz itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.tar.zst itisclient-50435729ca8d8f49d196ad0d6fe9241ac637a020.zip |
-rw-r--r-- | main.php | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -194,7 +194,10 @@ Errors: $xmlDoc->loadHTML($request_loop_output); $searchNode = $xmlDoc->getElementById('CPH_bodyMain_SearchResultsStatic1_UpdatePanelSearchResults')->getElementsByTagName("a"); foreach($searchNode as $sn) { - if(startsWith($sn->getAttribute("href"), "/oseba/")) $kontakti[] = filter_var("https://www.itis.si".$sn->getAttribute("href"), FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH); // just don't change your domain + if(startsWith($sn->getAttribute("href"), "/oseba/")) $kontakti[] = + preg_replace_callback('/[^\x20-\x7f]/', function($match) { + return urlencode($match[0]); + }, "https://www.itis.si".$sn->getAttribute("href")); // just don't change your domain } } return $kontakti; |