Commit c41b8297c7ac5978b6a4bc7b4115c2302c128e6e
Fix linkify with html-escaped input
Charles Lehner committed on 4/15/2016, 6:03:28 PMParent: 60b81f275381ddf3c79b13d2f57186d66f93fcec
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -131,9 +131,9 @@ | ||
131 | 131 | } |
132 | 132 | |
133 | 133 | function linkify(text) { |
134 | 134 | // regex is from ssb-ref |
135 | - return text.replace(/(@|%|&)[A-Za-z0-9\/+]{43}=\.[\w\d]+/g, function (str) { | |
135 | + return text.replace(/(@|%|&|&)[A-Za-z0-9\/+]{43}=\.[\w\d]+/g, function (str) { | |
136 | 136 | return '<a href="/' + encodeURIComponent(str) + '">' + str + '</a>' |
137 | 137 | }) |
138 | 138 | } |
139 | 139 |
Built with git-ssb-web