Once, I searched for a previous answer I wrote here to help out someone who was asking about a similar thing in chat. I copied the link to the answer I was looking for from the search results, and pasted the link into chat, expecting it to onebox, but it didn't (test case below):

Link to answer pasted from search results did not onebox

However, when I click on the answer link to go to the actual answer, and copy the URL into chat, the same answer oneboxes fine:

Link to the exact same answer, once clicked and copied, oneboxed just fine

This seemed very unexpected and I was confused as to why this was happening, until I checked the URLs I was copying for each:

  • First link: https://meta.stackexchange.com/questions/329887/why-did-my-first-post-review-not-count/329891?r=SearchResults&s=1|22.2321#329891

  • Second link: https://meta.stackexchange.com/questions/329887/why-did-my-first-post-review-not-count/329891#329891

It seems the ?r=SearchResults&s=1|22.2321 is confusing the chat system and making it not onebox. This part of the link is removed from the URL once one actually clicks on the link, so that was what was confusing me earlier.

Interestingly, this works fine for questions: question links copied from search results onebox just fine, and the system even strips out the extra text added by search from the oneboxed link.

Can a similar feature please be implemented for answer links copied from search results?

You must log in to answer this question.

Browse other questions tagged .