# Links in quotes sometimes not working

**URL:** https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540
**Category:** Bug
**Created:** [January 28, 2015, 9:02pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540 "2015-01-28T21:02:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![MeganeconJim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meganeconjim/32/115540_2.png) [@MeganeconJim](https://meta.discourse.org/u/MeganeconJim)
#### Post date: [January 28, 2015, 9:02pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/1 "2015-01-28T21:02:38Z")

</div>

Lately, I’ve been noticing that some hyperlinks will not work when they’re opened in the same tab.

The only example I can link at the moment is [this post](https://forums.hummingbird.me/t/yuyushiki-cast-reunite-to-record-three-mini-albums-slated-for-early-2015/20974/8?u=jim). \<-Click here to see the post in question.

If you Ctrl+click the link, it will open the intended YouTube video without issue. However, if you simply click on it, the link will mess up and take you to a blank, white screen.

I made a [bug thread on Hummingbird](https://forums.hummingbird.me/t/hyperlinks-sometimes-not-working/20999?u=jim), and HB contributor wopian said…

> [@wopian](#):
>
> Looks like it’s because the link it’s referencing (original post) doesn’t exist anymore so the tracker fails to update the click amount and thus doesn’t redirect you.
> 
> Should probably report it directly to Discourse as this is quite an important bug.

So, I am doing just that. I will try to check back here in case you guys need any more input from me. If I’m slow to reply, I can be easily reached on Hummingbird (username **Jim** ), or at the E-mail I registered here with.

Thanks!

---

<div class="post-metadata">

### Author: ![wopian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wopian/32/115541_2.png) [@wopian](https://meta.discourse.org/u/wopian)
#### Post date: [January 28, 2015, 10:02pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/4 "2015-01-28T22:02:25Z")

</div>

##[Here’s the bug in action in the Discourse TryIt](http://try.discourse.org/t/hyperlinks-dont-work-in-quotes/343)

* * *

Ok. So a user creates a post or comment that contains a link, whether it be in plain text, markdown or HTML hyperlinks (`https://google.com`, `[Google](https://google.com)` or `<a href="//google.com">`)

Another user then quotes part of this post which contains the link. Clicking on this link takes it through the click redirect and to the intended page ([google.com](http://google.com)) and also increases the click count on the original post.

Editing or deleting that post keeps the link in the quoted message, but upon clicking it and getting redirected to the click redirection page it hangs, as I presume it can’t find the link to increment.

The only way to currently **avoid** this is to use the right-click context menu `Open link in…`. Both left-click and middle-click encounter this issue.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [January 28, 2015, 10:08pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/5 "2015-01-28T22:08:54Z")

</div>

I wonder if this might be related to what I’ve noticed with links in deleted posts.

\*I have “open in new tab” selected in my Preferences

If I click on a link in a deleted post I get a blank page with the address bar showing similar to  
`http://community.sitepoint.com/clicks/track?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DSDokuMLmWCw&post_id=849278&topic_id=111370`

But if I right-click open in new tab the link loads the page in OK

---

<div class="post-metadata">

### Author: ![MeganeconJim](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meganeconjim/32/115540_2.png) [@MeganeconJim](https://meta.discourse.org/u/MeganeconJim)
#### Post date: [January 28, 2015, 11:37pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/6 "2015-01-28T23:37:31Z")

</div>

I’m very ignorant of how this kind of stuff works, but could this bug be caused by the fact that I deliberately misquoted ThatSam?

The words I quoted from his post weren’t originally a hyperlink. I changed what he said and added the link as a joke.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 29, 2015, 7:53am UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/7 "2015-01-29T07:53:01Z")

</div>

Oooh, that’s probably the bug - it doesn’t find the link in the post (or doesn’t find the post!) and errors out instead of passing you on.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [January 29, 2015, 10:55am UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/8 "2015-01-29T10:55:36Z")

</div>

Submitted a fix 🎊

[https://github.com/discourse/discourse/pull/3142](https://github.com/discourse/discourse/pull/3142)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [November 23, 2017, 9:54pm UTC](https://meta.discourse.org/t/links-in-quotes-sometimes-not-working/24540/9 "2017-11-23T21:54:51Z")

</div>


