Changeset 1648
- Timestamp:
- 01/02/07 14:24:57 (20 months ago)
- Location:
- trunk/gregarius
- Files:
-
- 4 modified
-
cls/channels.php (modified) (1 diff)
-
cls/items.php (modified) (2 diffs)
-
feed.php (modified) (9 diffs)
-
util.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/cls/channels.php
r1644 r1648 90 90 //$this->rlink = getPath().preg_replace("/[^a-zA-Z0-9_]/", "_", $title)."/"; 91 91 /* EXPERIMENTAL! */ 92 $this->rlink = getPath( ) . utf8_uri_encode(preg_replace('/[\s&\/\+]/','_',$title)) . "/";92 $this->rlink = getPath(rss_uri($title)) . "/"; 93 93 } else { 94 94 $this->rlink = getPath()."feed.php?channel=$id"; -
trunk/gregarius/cls/items.php
r1561 r1648 73 73 $this->title = "[nt]"; 74 74 } 75 $this->escapedTitle = preg_replace("/[^A-Za-z0-9%\.]/", "_", utf8_uri_encode($title)); 75 $this->escapedTitle = rss_uri($title); //preg_replace("/[^A-Za-z0-9%\.]/", "_", utf8_uri_encode($title)); 76 76 77 $this->url = trim($url); 77 78 $this->enclosure = $enclosure; … … 136 137 $this->iconUrl = $icon; 137 138 } 138 $this->escapedTitle = preg_replace("/[^A-Za-z0-9\.]/", "_", $title); 139 //$this->escapedTitle = preg_replace("/[^A-Za-z0-9\.]/", "_", $title); 140 $this->escapedTitle = rss_uri($title); 139 141 } 140 142 -
trunk/gregarius/feed.php
r1561 r1648 914 914 $prev = $succ = $up = null; 915 915 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']); 917 917 } else { 918 918 $escaped_title = null; … … 1125 1125 'url' => makeArchiveUrl($pts_,$escaped_title,$cid,true) 1126 1126 . (getConfig('rss.output.usemodrewrite') ? 1127 preg_replace("/[^A-Za-z0-9\.%]/","_",utf8_uri_encode($ptitle_)):1127 rss_uri($ptitle_): 1128 1128 "&iid=$piid_"), 1129 1129 'lbl' => htmlentities( $ptitle_,ENT_COMPAT,"UTF-8" ) … … 1143 1143 'url' => makeArchiveUrl($ts_,$escaped_title,$cid,true) 1144 1144 . (getConfig('rss.output.usemodrewrite') ? 1145 preg_replace("/[^A-Za-z0-9\.%]/","_",utf8_uri_encode($title_)) :1145 rss_uri($title_) : 1146 1146 "&iid=$iid_"), 1147 1147 'lbl' => htmlentities($title_,ENT_COMPAT,"UTF-8") … … 1206 1206 'url' => getPath(). 1207 1207 ( getConfig('rss.output.usemodrewrite') ? 1208 preg_replace("/[^A-Za-z0-9\.]/","_",$title_) ."/"1208 rss_uri($title_) ."/" 1209 1209 :"feed.php?channel=$cid_") , 1210 1210 'lbl' => htmlentities( $title_,ENT_COMPAT,"UTF-8" ) … … 1216 1216 'url' => getPath(). 1217 1217 ( getConfig('rss.output.usemodrewrite') ? 1218 preg_replace("/[^A-Za-z0-9\.]/","_",$title_) ."/"1218 rss_uri($title_) ."/" 1219 1219 :"feed.php?channel=$cid_") , 1220 1220 'lbl' => htmlentities( $title_,ENT_COMPAT,"UTF-8" ) … … 1255 1255 'url' => getPath(). 1256 1256 ( getConfig('rss.output.usemodrewrite') ? 1257 preg_replace("/[^A-Za-z0-9\.]/","_",$vftitle_) ."/"1257 rss_uri($vftitle_) ."/" 1258 1258 :"feed.php?vfolder=$vfid_") , 1259 1259 'lbl' => htmlentities( $vftitle_,ENT_COMPAT,"UTF-8" ) … … 1267 1267 'url' => getPath(). 1268 1268 ( getConfig('rss.output.usemodrewrite') ? 1269 preg_replace("/[^A-Za-z0-9\.]/","_",$vftitle_) ."/"1269 rss_uri($vftitle_) ."/" 1270 1270 :"feed.php?vfolder=$vfid_") , 1271 1271 'lbl' => htmlentities( $vftitle_,ENT_COMPAT,"UTF-8" ) … … 1318 1318 'url' => getPath(). 1319 1319 ( getConfig('rss.output.usemodrewrite') ? 1320 preg_replace("/[^A-Za-z0-9\.]/","_",$ftitle__) ."/"1320 rss_uri($ftitle__) ."/" 1321 1321 :"feed.php?folder=$fid__") , 1322 1322 'lbl' => htmlentities( $ftitle__,ENT_COMPAT,"UTF-8" ) … … 1330 1330 'url' => getPath(). 1331 1331 ( getConfig('rss.output.usemodrewrite') ? 1332 preg_replace("/[^A-Za-z0-9\.]/","_",$ftitle__) ."/"1332 rss_uri($ftitle__) ."/" 1333 1333 :"feed.php?folder=$fid__") , 1334 1334 'lbl' => htmlentities( $ftitle__,ENT_COMPAT,"UTF-8" ) -
trunk/gregarius/util.php
r1644 r1648 1156 1156 } 1157 1157 1158 function rss_uri($title, $sep='_') { 1159 return utf8_uri_encode(preg_replace('#[\s&/\+\'"\?]#',$sep,$title)); 1160 } 1158 1161 ?>
