Changeset 17800
- Timestamp:
- 09/03/07 17:15:55 (10 months ago)
- Files:
-
- absoluterss/trunk/absoluteRSS.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
absoluterss/trunk/absoluteRSS.php
r17798 r17800 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. 07 Version: 1.1 8 8 Author URI: http://robert.accettura.com 9 9 License: GPL (http://www.gnu.org/licenses/gpl.txt) 10 Copyright (C) 2005 Robert Accettura10 Copyright (C) 2005-2007 Robert Accettura 11 11 12 12 This program is free software; you can redistribute it and/or … … 28 28 29 29 function absoluteRSS($content){ 30 global $doing_rss;30 global $doing_rss; 31 31 if (is_feed() || $doing_rss) { 32 32 // replace <img src=""/> and <a href=""/> with absolute links 33 return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".get_settings(' siteurl')."/\\5\"", $content);33 return preg_replace( "/<(a|img)(.*?)(href|src)=('|\")\/(.*?)('|\")/is", "<\\1\\2\\3=\"".get_settings('home')."/\\5\"", $content); 34 34 } 35 35 // just return content untouched if it's not a feed
