redirectWhenOnlyOneResult() : Added urlencode() of object's DN in redirect URL
authorBenjamin Renard <brenard@easter-eggs.com>
Thu, 3 May 2012 10:39:50 +0000 (12:39 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Thu, 3 May 2012 10:39:50 +0000 (12:39 +0200)
public_html/includes/class/class.LSsearch.php

index 2e7c998..5eaf913 100644 (file)
@@ -1046,7 +1046,7 @@ class LSsearch {
    **/
   function redirectWhenOnlyOneResult() {
     if ($this -> total == 1 && $this -> result && self::formIsSubmited()) {
-      LSsession :: redirect('view.php?LSobject='.$this -> LSobject.'&dn='.$this -> result['list'][0]['dn']);
+      LSsession :: redirect('view.php?LSobject='.$this -> LSobject.'&dn='.urlencode($this -> result['list'][0]['dn']));
     }
     return;
   }