# Embedded topic comments are missing if containing page's URL includes a fragment identifier

**URL:** <https://meta.discourse.org/t/embedded-topic-comments-are-missing-if-containing-pages-url-includes-a-fragment-identifier/93235>\
**Category:** Bug\
**Created:** [July 26, 2018, 9:00pm UTC](https://meta.discourse.org/t/embedded-topic-comments-are-missing-if-containing-pages-url-includes-a-fragment-identifier/93235 "2018-07-26T21:00:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![aribadernatal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aribadernatal/32/527594_2.png) [@aribadernatal](https://meta.discourse.org/u/aribadernatal)\
**Post date:** [July 26, 2018, 9:00pm UTC](https://meta.discourse.org/t/embedded-topic-comments-are-missing-if-containing-pages-url-includes-a-fragment-identifier/93235/1 "2018-07-26T21:00:40Z")

</div>

Discourse’s ability to [embed comments from a topic into an external site](https://meta.discourse.org/t/embedding-discourse-comments-via-javascript/31963) is wonderful and works amazingly well.

I did run into a small issue that I would consider a bug:

If I have a page on an external site [http://example.com/test.html](http://example.com/test.html), all comments from the companion topic are displayed in the iframe, as expected. If I visit the same page with a fragment identifier appended to the URL (e.g. [http://example.com/test.html#references](http://example.com/test.html#references) or even [http://example.com/test.html#](http://example.com/test.html#)), the comments do not display. It seems like this is because the companion pairing is based on an exact string match. In practice, I think an exact string match is too strict.

I would expect the following external site URLs to all embed the same set of comments:

1. [http://example.com/test.html](http://example.com/test.html)
2. [http://example.com/test.html#](http://example.com/test.html#)
3. [http://example.com/test.html#foo](http://example.com/test.html#foo)

---

_[View the full topic](https://meta.discourse.org/t/embedded-topic-comments-are-missing-if-containing-pages-url-includes-a-fragment-identifier/93235)._
