diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 index bbbf95d2755..bf3a323752a 100644 --- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 @@ -104,6 +104,11 @@ export default class PostCooked { valid = href.indexOf(lc.url) >= 0; } + // Match server-side behaviour for internal links with query params + if (lc.internal && /\?/.test(href)) { + valid = href.split("?")[0] === lc.url; + } + // don't display badge counts on category badge & oneboxes (unless when explicitely stated) if (valid && isValidLink($link)) { const title = I18n.t("topic_map.clicks", { count: lc.clicks });