diff --git a/pandora/item/utils.py b/pandora/item/utils.py
index 83932967..70a88086 100644
--- a/pandora/item/utils.py
+++ b/pandora/item/utils.py
@@ -75,6 +75,7 @@ def get_positions(ids, pos, decode_id=False):
if decode_id:
positions[i] = ids.index(ox.fromAZ(i))
else:
+ i = unicodedata.normalize('NFKD', i)
positions[i] = ids.index(i)
except:
pass
diff --git a/static/js/documentInfoView.js b/static/js/documentInfoView.js
index 8e2a20a9..1e95728d 100644
--- a/static/js/documentInfoView.js
+++ b/static/js/documentInfoView.js
@@ -423,8 +423,10 @@ pandora.ui.documentInfoView = function(data, isMixed) {
function formatLink(value, key) {
return (Ox.isArray(value) ? value : [value]).map(function(value) {
+ var documentKey = Ox.getObjectById(pandora.site.documentKeys, key),
+ op = documentKey && documentKey.filter ? '==' : '=';
return key
- ? '' + value + ''
+ ? '' + value + ''
: value;
}).join(', ');
}
diff --git a/static/js/infoView.js b/static/js/infoView.js
index 440cb9b0..59cccc69 100644
--- a/static/js/infoView.js
+++ b/static/js/infoView.js
@@ -528,10 +528,12 @@ pandora.ui.infoView = function(data, isMixed) {
linkValue = linkValue || value
linkValue = Ox.isArray(linkValue) ? linkValue: [linkValue]
return (Ox.isArray(value) ? value : [value]).map(function(value, idx) {
+ var itemKey = Ox.getObjectById(pandora.site.itemKeys, key),
+ op = itemKey && itemKey.filter ? '==' : '=';
return key
? '' + value + ''
+ ) + op + pandora.escapeQueryValue(Ox.decodeHTMLEntities(linkValue[idx])) + '">' + value + ''
: value;
}).join(Ox.contains(specialListKeys, key) ? '; ' : ', ');
}
diff --git a/static/js/utils.js b/static/js/utils.js
index c7569882..e0a9233b 100644
--- a/static/js/utils.js
+++ b/static/js/utils.js
@@ -1654,6 +1654,11 @@ pandora.getItem = function(state, str, callback) {
}
});
} else if (state.type == 'documents') {
+ if (!pandora.isBase26(str)) {
+ state.item = '';
+ callback();
+ return
+ }
pandora.api.getDocument({
id: str,
// send keys so that subsequent request when parsing
@@ -1702,6 +1707,10 @@ pandora.getItem = function(state, str, callback) {
}
};
+pandora.isBase26 = function(value) {
+ return /^[A-Z]+$/.test(value)
+};
+
pandora.getItemFind = function(find) {
var itemFind = '';
Ox.forEach(find.conditions, function(condition) {