From: VirtualTam Date: Fri, 21 Oct 2016 09:04:52 +0000 (+0200) Subject: Merge pull request #673 from virtualtam/cleanup/linkdb X-Git-Tag: v0.8.1~17 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=3d5e0aede31e07f060e3ca470d36374c54d5040c;hp=735ed4a94e1da5874195ac47c00612043a193edf;p=github%2Fshaarli%2FShaarli.git Merge pull request #673 from virtualtam/cleanup/linkdb LinkDB: code cleanup --- diff --git a/CHANGELOG.md b/CHANGELOG.md index e32ef459..d42d6a75 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 c6657fbb..4036a7cc 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 aa57f44e..d7839402 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']); } }