Commit f2834677 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #239 from hypothesis/quote-is-not-html

Don't treat annotation quotes (TextQuoteSelector.exact) as HTML
parents 905b4510 6fd90c56
......@@ -989,5 +989,15 @@ describe('annotation', function() {
assert.equal(controller.links().html, '');
});
});
it('renders quotes as plain text', function () {
var ann = fixtures.defaultAnnotation();
ann.target[0].selector = [{
type: 'TextQuoteSelector',
exact: '<<-&->>',
}];
var el = createDirective(ann).element;
assert.equal(el[0].querySelector('blockquote').textContent, '<<-&->>');
});
});
});
......@@ -63,7 +63,7 @@
overflow-hysteresis="20"
content-data="selector.exact">
<blockquote class="annotation-quote"
ng-bind-html="selector.exact"
ng-bind="selector.exact"
ng-repeat="selector in target.selector
| filter : {'type': 'TextQuoteSelector'}
track by $index"></blockquote>
......
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