diff --git a/CHANGELOG.md b/CHANGELOG.md index e32ef45..d42d6a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Plugins: - Tools: only display parameter description when it exists - archive.org: do not propose archival of private notes +- Use absolute URL for hashtags in RSS and ATOM feeds ### Security - Allow whitelisting trusted IPs, else continue banning clients upon login failure diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index c6657fb..4036a7c 100644 --- a/application/FeedBuilder.php +++ b/application/FeedBuilder.php @@ -153,7 +153,8 @@ class FeedBuilder } else { $permalink = 'Permalink'; } - $link['description'] = format_description($link['description']) . PHP_EOL .'
— '. $permalink; + $link['description'] = format_description($link['description'], '', $pageaddr); + $link['description'] .= PHP_EOL .'
— '. $permalink; $pubDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']); $link['pub_iso_date'] = $this->getIsoDate($pubDate); diff --git a/tests/FeedBuilderTest.php b/tests/FeedBuilderTest.php index aa57f44..d783940 100644 --- a/tests/FeedBuilderTest.php +++ b/tests/FeedBuilderTest.php @@ -249,5 +249,6 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase $link = array_shift($data['links']); $this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['guid']); $this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['url']); + $this->assertContains('http://host.tld:8080/~user/shaarli/?addtag=hashtag', $link['description']); } }