Onebox of link with anchor

I noticed a strage behavior with the onebox of an anchor link.
Steps

  1. Create a topic with anchors
  2. Answer to that post
  3. Answer again with an anchor link to the second headline

β†’ Expected result a onebox showing the beginning of the linked post. At least this in what will happen if you post the same link in another topic. But you see the first answer as a onebox.


Testing in this topic

A text with some headlines

This is a headline

This is text after the headline

This is a second headline

This is again some text

This is a third headline

And again some text

And this is the second post

And the post with the anchor link

The link directs to the second headline in the first post, but the onebox shows the second post

https://meta.discourse.org/t/onebox-of-link-with-anchor/234110#this-is-a-second-headline-2

This is a fun one. :slight_smile: In my preview it’s showing the OP in the onebox. Let’s see if it travels through to posting.

Update: That seemed to work okay. Perhaps something to do with the post number or user? I shall have an explore on my test site. Thanks for reporting @Moin :slight_smile: :+1:

1 Like

You can also have a look at my tries at try.discourse.org

1 Like

I think this was fixed. I cannot reproduce it anymore Anchors in links - #3 by Moin - general - Discourse Demo

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.