Show
Ignore:
Timestamp:
01/02/07 14:24:57 (23 months ago)
Author:
mbonetti
Message:

More uniform handling of UTF-8 uri generation. Will probably need better
filtering in rss_uri(). Fix for #150, too.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/feed.php

    r1561 r1648  
    914914    $prev = $succ = $up = null; 
    915915    if (isset($_REQUEST['channel'])) { 
    916         $escaped_title = preg_replace("/[^A-Za-z0-9\.]/","_",$_REQUEST['channel']); 
     916        $escaped_title = rss_uri($_REQUEST['channel']); //preg_replace("/[^A-Za-z0-9\.]/","_",$_REQUEST['channel']); 
    917917    } else { 
    918918        $escaped_title = null; 
     
    11251125                                    'url' =>  makeArchiveUrl($pts_,$escaped_title,$cid,true) 
    11261126                                           . (getConfig('rss.output.usemodrewrite') ? 
    1127                                               preg_replace("/[^A-Za-z0-9\.%]/","_",utf8_uri_encode($ptitle_)): 
     1127                                              rss_uri($ptitle_): 
    11281128                                              "&iid=$piid_"), 
    11291129                                    'lbl' => htmlentities( $ptitle_,ENT_COMPAT,"UTF-8" ) 
     
    11431143                                    'url' =>  makeArchiveUrl($ts_,$escaped_title,$cid,true) 
    11441144                                           . (getConfig('rss.output.usemodrewrite') ? 
    1145                                               preg_replace("/[^A-Za-z0-9\.%]/","_",utf8_uri_encode($title_)) : 
     1145                                              rss_uri($title_) : 
    11461146                                              "&iid=$iid_"), 
    11471147                                    'lbl' => htmlentities($title_,ENT_COMPAT,"UTF-8") 
     
    12061206                                'url' => getPath(). 
    12071207                                       ( getConfig('rss.output.usemodrewrite') ? 
    1208                                          preg_replace("/[^A-Za-z0-9\.]/","_",$title_) ."/" 
     1208                                         rss_uri($title_) ."/" 
    12091209                                         :"feed.php?channel=$cid_") , 
    12101210                                'lbl' => htmlentities( $title_,ENT_COMPAT,"UTF-8" ) 
     
    12161216                                'url' => getPath(). 
    12171217                                       ( getConfig('rss.output.usemodrewrite') ? 
    1218                                          preg_replace("/[^A-Za-z0-9\.]/","_",$title_) ."/" 
     1218                                         rss_uri($title_) ."/" 
    12191219                                         :"feed.php?channel=$cid_") , 
    12201220                                'lbl' => htmlentities( $title_,ENT_COMPAT,"UTF-8" ) 
     
    12551255                            'url' => getPath(). 
    12561256                                   ( getConfig('rss.output.usemodrewrite') ? 
    1257                                      preg_replace("/[^A-Za-z0-9\.]/","_",$vftitle_) ."/" 
     1257                                     rss_uri($vftitle_) ."/" 
    12581258                                     :"feed.php?vfolder=$vfid_") , 
    12591259                            'lbl' => htmlentities( $vftitle_,ENT_COMPAT,"UTF-8" ) 
     
    12671267                            'url' => getPath(). 
    12681268                                   ( getConfig('rss.output.usemodrewrite') ? 
    1269                                      preg_replace("/[^A-Za-z0-9\.]/","_",$vftitle_) ."/" 
     1269                                     rss_uri($vftitle_) ."/" 
    12701270                                     :"feed.php?vfolder=$vfid_") , 
    12711271                            'lbl' => htmlentities( $vftitle_,ENT_COMPAT,"UTF-8" ) 
     
    13181318                            'url' => getPath(). 
    13191319                                   ( getConfig('rss.output.usemodrewrite') ? 
    1320                                      preg_replace("/[^A-Za-z0-9\.]/","_",$ftitle__) ."/" 
     1320                                     rss_uri($ftitle__) ."/" 
    13211321                                     :"feed.php?folder=$fid__") , 
    13221322                            'lbl' => htmlentities( $ftitle__,ENT_COMPAT,"UTF-8" ) 
     
    13301330                            'url' => getPath(). 
    13311331                                   ( getConfig('rss.output.usemodrewrite') ? 
    1332                                      preg_replace("/[^A-Za-z0-9\.]/","_",$ftitle__) ."/" 
     1332                                    rss_uri($ftitle__) ."/" 
    13331333                                     :"feed.php?folder=$fid__") , 
    13341334                            'lbl' => htmlentities( $ftitle__,ENT_COMPAT,"UTF-8" )