Commit da2e4c60 authored by Nick Stenning's avatar Nick Stenning

Merge pull request #2993 from hypothesis/fix-tag-links

Fix annotation tag links
parents 0958b019 04e92374
......@@ -1465,5 +1465,21 @@ describe('annotation', function() {
});
});
});
describe('tag display', function () {
it('displays annotation tags', function () {
var directive = createDirective({
id: '1234',
tags: ['atag']
});
var links = [].slice.apply(directive.element[0].querySelectorAll('a'));
var tagLinks = links.filter(function (link) {
return link.textContent === 'atag';
});
assert.equal(tagLinks.length, 1);
assert.equal(tagLinks[0].href,
'https://test.hypothes.is/stream?q=tag:atag');
});
});
});
});
......@@ -104,7 +104,7 @@
ng-if="(vm.canCollapseBody || vm.form.tags.length) && !vm.editing()">
<ul class="tag-list">
<li class="tag-item" ng-repeat="tag in vm.form.tags">
<a ng-href="vm.tagStreamURL(tag.text)" target="_blank">{{tag.text}}</a>
<a ng-href="{{vm.tagStreamURL(tag.text)}}" target="_blank">{{tag.text}}</a>
</li>
</ul>
<div class="u-stretch"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment