summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views_rss.module5
1 files changed, 1 insertions, 4 deletions
diff --git a/views_rss.module b/views_rss.module
index 139251b..eedb16e 100644
--- a/views_rss.module
+++ b/views_rss.module
@@ -139,10 +139,7 @@ function views_rss_rewrite_relative_paths($element) {
!isset($element['view']->style_plugin->options['feed_settings']['absolute_paths'])
|| !empty($element['view']->style_plugin->options['feed_settings']['absolute_paths'])
) {
- $baseurl = $GLOBALS['base_url'];
- if (substr($baseurl, -1, 1) != '/') {
- $baseurl .= '/';
- }
+ $baseurl = trim($GLOBALS['base_url'], '/') . '/';
// Replace link paths.
$pattern = "/<a([^>]*) href=\"[^http|ftp|https]([^\"]*)\"/";
$replacement = "<a\${1} href=\"" . $baseurl . "\${2}\"";