Fix hashtags links in Feeds
Make the hashtag link absolute in feeds to work properly in RSS syndication tools.
This commit is contained in:
parent
ceeb8fbeb8
commit
fbc28ff1c8
3 changed files with 4 additions and 1 deletions
|
@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- Plugins:
|
- Plugins:
|
||||||
- Tools: only display parameter description when it exists
|
- Tools: only display parameter description when it exists
|
||||||
- archive.org: do not propose archival of private notes
|
- archive.org: do not propose archival of private notes
|
||||||
|
- Use absolute URL for hashtags in RSS and ATOM feeds
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
- Allow whitelisting trusted IPs, else continue banning clients upon login failure
|
- Allow whitelisting trusted IPs, else continue banning clients upon login failure
|
||||||
|
|
|
@ -153,7 +153,8 @@ protected function buildItem($link, $pageaddr)
|
||||||
} else {
|
} else {
|
||||||
$permalink = '<a href="'. $link['guid'] .'" title="Permalink">Permalink</a>';
|
$permalink = '<a href="'. $link['guid'] .'" title="Permalink">Permalink</a>';
|
||||||
}
|
}
|
||||||
$link['description'] = format_description($link['description']) . PHP_EOL .'<br>— '. $permalink;
|
$link['description'] = format_description($link['description'], '', $pageaddr);
|
||||||
|
$link['description'] .= PHP_EOL .'<br>— '. $permalink;
|
||||||
|
|
||||||
$pubDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
|
$pubDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']);
|
||||||
$link['pub_iso_date'] = $this->getIsoDate($pubDate);
|
$link['pub_iso_date'] = $this->getIsoDate($pubDate);
|
||||||
|
|
|
@ -249,5 +249,6 @@ public function testBuildDataServerSubdir()
|
||||||
$link = array_shift($data['links']);
|
$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['guid']);
|
||||||
$this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['url']);
|
$this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['url']);
|
||||||
|
$this->assertContains('http://host.tld:8080/~user/shaarli/?addtag=hashtag', $link['description']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue