FIX: stop stripping local onebox links from tracker

When a onebox was made to a local topic it was not tracked using link
tracker
This commit is contained in:
Sam 2017-02-01 10:42:05 -05:00
parent cef8a0af34
commit f932cb51f3
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<aside class='quote' data-post="1" data-topic="{{topic}}">
<aside class='quote topic-onebox' data-post="1" data-topic="{{topic}}">
<div class='title'>
{{{avatar}}}
<a href="{{original_url}}">{{{title}}}</a> {{{category_html}}}

View File

@ -284,7 +284,7 @@ module PrettyText
links = []
doc = Nokogiri::HTML.fragment(html)
# remove href inside quotes & elided part
doc.css("aside.quote a, .elided a").each { |l| l["href"] = "" }
doc.css("aside.quote:not(.topic-onebox) a, .elided a").each { |l| l["href"] = "" }
# extract all links from the post
doc.css("a").each { |l|