git ssb

16+

Dominic / patchbay



Commit 6f4a164dcf3ceba120878c266e2f477496eb7b3e

make raw msg links work, relax ?-prefix requirment for search

mix irving committed on 3/30/2017, 4:59:02 AM
Parent: dc1af5e85e5120dcd7fb92d8da7338908ff423e8

Files changed

message/html/meta/raw.jschanged
router/html/page/search.jschanged
message/html/meta/raw.jsView
@@ -58,8 +58,8 @@
5858 var refRegex = /((?:@|%|&)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g
5959
6060 var arr = text.split(refRegex)
6161 for (var i = 1; i < arr.length; i += 2) {
62- arr[i] = h('a', {href: '#' + arr[i]}, arr[i])
62+ arr[i] = h('a', {href: arr[i]}, arr[i])
6363 }
6464 return arr
6565 }
router/html/page/search.jsView
@@ -75,11 +75,11 @@
7575
7676 return nest('router.html.page', searchPage)
7777
7878 function searchPage (path) {
79- if (path[0] !== '?') return
79+ if (path.match(/^[@#%\/]/)) return
8080
81- var queryStr = path.substr(1).trim()
81+ var queryStr = path.replace(/^\??/, '').trim()
8282 var query = queryStr.split(whitespace)
8383 var matchesQuery = searchFilter(query)
8484
8585 const search = Struct({

Built with git-ssb-web