diff --git a/js/browser.js b/js/browser.js
index 098c4b9..c68cdfa 100644
--- a/js/browser.js
+++ b/js/browser.js
@@ -2,6 +2,7 @@ $(document).ready(function() {
var
urlRegex = /(#(.+)|\/([^\/#]+))$/,
fragidRegex = /^#row=(\d+)(-(\d+))?$/,
+ dontShowUri = /\&showUri=false/.test(document.location.search) ? true : false,
extractMetadata = function (metadata, fields) {
var value;
@@ -64,7 +65,10 @@ $(document).ready(function() {
v += '';
return v;
} else if (value['@id']) {
- return '';
+ if(dontShowUri)
+ return '';
+ else
+ return '' + value['@id'] + '';
} else if (value['@value']) {
v = value['@value'].replace(/\s+/, ' ');
if (includeBadge) {
@@ -406,8 +410,14 @@ $(document).ready(function() {
},
query = document.location.search,
- url = /^\?url=/.test(query) ? decodeURIComponent(query.substring(5)) : null,
+ url,
filename;
+
+ var pos = query.indexOf("&showUri");
+ if (pos != -1)
+ url = /^\?url=/.test(query) ? decodeURIComponent(query.substring(5,pos)) : null;
+ else
+ url = /^\?url=/.test(query) ? decodeURIComponent(query.substring(5)) : null;
if (url) {
filename = urlRegex.exec(url)[3];
diff --git a/js/jquery.linked-csv.js b/js/jquery.linked-csv.js
index 72e22b2..4f059e4 100644
--- a/js/jquery.linked-csv.js
+++ b/js/jquery.linked-csv.js
@@ -18,6 +18,7 @@
'skos-xl': "http://www.w3.org/2008/05/skos-xl#", // SKOS Extensions for Labels
},
prefixRegex = new RegExp('^(' + Object.keys(namespaces).join('|') + '):(.+)$'),
+ uriRegex = /^(([a-z][\-a-z0-9+\.]*):){1}(\/\/([^\/?#]+))?([^?#]*)?(\?([^#]*))?(#(.*))?$/i,
init = function (linkedCSV, data, base) {
var
@@ -52,7 +53,7 @@
},
parseValue = function(value, type, lang) {
var val = value;
- if (type === 'url') {
+ if (type === 'url' || uriRegex.test(value)) {
val = {
'@id': $.uri.resolve(value, base).toString()
};