Commit 9357a5e729bcc1b6addd132bf1c7a860b13364d5
URL-encode in href: msg ids, not feed or blob ids
cel committed on 8/23/2018, 9:28:13 PMParent: afabd2eacb34221e1b60ed77cce59a621e8c8022
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -33,11 +33,11 @@ | ||
33 | 33 | case "%": |
34 | 34 | return this.opts.msg_base + encodeURIComponent(href); |
35 | 35 | case "@": |
36 | 36 | href = (this.opts.mentions && this.opts.mentions[href.substr(1)]) || href; |
37 | - return this.opts.feed_base + encodeURIComponent(href); | |
37 | + return this.opts.feed_base + href; | |
38 | 38 | case "&": |
39 | - return this.opts.blob_base + encodeURIComponent(href); | |
39 | + return this.opts.blob_base + href; | |
40 | 40 | } |
41 | 41 | if (href.indexOf("javascript:") === 0) return false; |
42 | 42 | return href; |
43 | 43 | }; |
@@ -440,17 +440,17 @@ | ||
440 | 440 | if (typeof c.vote.linkedText != "undefined") |
441 | 441 | linkedText = c.vote.linkedText.substring(0, 75); |
442 | 442 | return h('span.status', |
443 | 443 | ['Liked ', |
444 | - h('a', { href: base + c.vote.link }, linkedText), | |
444 | + h('a', { href: base + encodeURIComponent(c.vote.link) }, linkedText), | |
445 | 445 | channel]); |
446 | 446 | } else if (c.type == "vote") { |
447 | 447 | var linkedText = "this"; |
448 | 448 | if (typeof c.vote.linkedText != "undefined") |
449 | 449 | linkedText = c.vote.linkedText.substring(0, 75); |
450 | 450 | return h('span.status', |
451 | 451 | ['Voted ', |
452 | - h('a', { href: base + c.vote.link }, linkedText)]); | |
452 | + h('a', { href: base + encodeURIComponent(c.vote.link) }, linkedText)]); | |
453 | 453 | } else if (c.type == "contact" && c.following) { |
454 | 454 | var name = c.contact; |
455 | 455 | if (typeof c.contactAbout != "undefined") |
456 | 456 | name = c.contactAbout.name; |
Built with git-ssb-web