Dotclear


Ignore:
Timestamp:
01/18/15 08:04:21 (11 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.7
Message:

Cope with $n%s in parametric URLs, fixes #2057

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.dc.adminurl.php

    r2873 r2921  
    8787               $u .= '?'.http_build_query($p,'',$separator); 
    8888          } 
    89           // Dirty hack to get back %s instead of %25s in URLs used with (s)printf(), as http_build_query urlencode() its result. 
    90           return $parametric ? str_replace('%25s','%s',$u) : $u; 
     89          if ($parametric) { 
     90               // Dirty hack to get back %[n$]s instead of %25[{0..9}%24]s in URLs used with (s)printf(), as http_build_query urlencode() its result. 
     91               $u = preg_replace('/\%25(([0-9])+?\%24)*?s/','%$2s',$u); 
     92          } 
     93          return $u; 
    9194     } 
    9295 
Note: See TracChangeset for help on using the changeset viewer.

Sites map