Browse Source

somehow url vars with &amp are not picked up by PHP

stekkel 23 years ago
parent
commit
d1708e2a00
1 changed files with 3 additions and 2 deletions
  1. 3 2
      functions/html.php

+ 3 - 2
functions/html.php

@@ -88,6 +88,7 @@
                        '/.+(\\?'.$var.')=(.*)$/AU',     /* at front and only var */
                        '/.+(\\?'.$var.')=(.*)$/AU',     /* at front and only var */
                        '/.+(\\&'.$var.')=(.*)$/AU'      /* at the end */
                        '/.+(\\&'.$var.')=(.*)$/AU'      /* at the end */
                      );
                      );
+//	preg_replace('/&/','&',$url);	     
         switch (true) {
         switch (true) {
             case (preg_match($pat_a[0],$url,$regs)):
             case (preg_match($pat_a[0],$url,$regs)):
                 $k = $regs[1];
                 $k = $regs[1];
@@ -108,7 +109,7 @@
             default:
             default:
                 if ($val) {
                 if ($val) {
                     if (strpos($url,'?')) {
                     if (strpos($url,'?')) {
-                        $url .= "&$var=$val";
+                        $url .= "&$var=$val";
                     } else {
                     } else {
                         $url .= "?$var=$val";
                         $url .= "?$var=$val";
                     }
                     }
@@ -119,7 +120,7 @@
         if ($k) {
         if ($k) {
             if ($val) {
             if ($val) {
                 $rpl = "$k=$val";
                 $rpl = "$k=$val";
-		$rpl = preg_replace('/&/','&',$rpl);
+//		$rpl = preg_replace('/&/','&',$rpl);
             } else {
             } else {
                 $rpl = '';
                 $rpl = '';
             }
             }