diff --git a/lib/marked.js b/lib/marked.js
index <HASH>..<HASH> 100644
--- a/lib/marked.js
+++ b/lib/marked.js
@@ -314,7 +314,7 @@ var inline = {
 };
 
 inline._linkInside = /(?:\[[^\]]*\]|[^\]]|\](?=[^\[]*\]))*/;
-inline._linkHref = /\s*<?([^\s]*?)>?(?:\s+(['"])([^\0]*?)\3)?\s*/;
+inline._linkHref = /\s*<?([^\s]*?)>?(?:\s+['"]([^\0]*?)['"])?\s*/;
 
 inline.link = replace(inline.link)
   ('inside', inline._linkInside)
@@ -409,7 +409,7 @@ inline.lexer = function(src) {
       src = src.substring(cap[0].length);
       out += outputLink(cap, {
         href: cap[2],
-        title: cap[4]
+        title: cap[3]
       });
       continue;
     }
avoid backreference in link regex