Changeset 17804
- Timestamp:
- 09/03/07 17:18:50 (11 months ago)
- Files:
-
- 1 modified
-
absoluterss/trunk/absoluteRSS.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
absoluterss/trunk/absoluteRSS.php
r17800 r17804 5 5 Description: Adjusts your links in RSS to use absolute links so that they work correctly in all feed readers (and validate). GPL Licensed. 6 6 Author: Robert Accettura 7 Version: 1.1 7 Version: 1.1.1 8 8 Author URI: http://robert.accettura.com 9 9 License: GPL (http://www.gnu.org/licenses/gpl.txt) … … 30 30 global $doing_rss; 31 31 if (is_feed() || $doing_rss) { 32 $home = parse_url(get_settings('home')); 33 $home = $home['scheme'].'://'.$home['host']; 32 34 // replace <img src=""/> and <a href=""/> with absolute links 33 return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"". get_settings('home')."/\\5\"", $content);35 return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".$home."/\\5\"", $content); 34 36 } 35 37 // just return content untouched if it's not a feed
