diff --git a/server/go/camlistored/ui/blobinfo.js b/server/go/camlistored/ui/blobinfo.js index ba5c9ed5b..b71f32939 100644 --- a/server/go/camlistored/ui/blobinfo.js +++ b/server/go/camlistored/ui/blobinfo.js @@ -47,11 +47,6 @@ function blobInfoUpdate(bmap) { } } -function linkifyBlobRefs(schemaBlob) { - var re = /(\w{3,6}-[a-f0-9]{30,})/g; - return schemaBlob.replace(re, "$1"); -} - function blobInfoOnLoad() { var blobref = getBlobParam(); if (!blobref) { diff --git a/server/go/camlistored/ui/camli.js b/server/go/camlistored/ui/camli.js index 403b3a152..9f9944052 100644 --- a/server/go/camlistored/ui/camli.js +++ b/server/go/camlistored/ui/camli.js @@ -233,6 +233,11 @@ function isPlausibleBlobRef(blobRef) { return /^\w+-[a-f0-9]+$/.test(blobRef); } +function linkifyBlobRefs(schemaBlob) { + var re = /(\w{3,6}-[a-f0-9]{30,})/g; + return schemaBlob.replace(re, "$1"); +} + // Helper function for camliNewSetAttributeClaim() (and eventually, for // similar functions to add or delete attributes). function changeAttribute(permanode, claimType, attribute, value, opts) { diff --git a/server/go/camlistored/ui/search.js b/server/go/camlistored/ui/search.js index 6e78d1dd6..7673c1ee5 100644 --- a/server/go/camlistored/ui/search.js +++ b/server/go/camlistored/ui/search.js @@ -6,7 +6,7 @@ function search() { console.log("no status 200; got " + xhr.status); return; } - document.getElementById("searchres").innerHTML = "
" + xhr.responseText + "
"; + document.getElementById("searchres").innerHTML = "
" + linkifyBlobRefs(xhr.responseText) + "
"; }; xhr.open("GET", disco.searchRoot + "camli/search", true); xhr.send();