Commit 6a4a58f1 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

Fixing bad display of objects

parent a52cb417
......@@ -87,13 +87,13 @@ var Util = function() {
};
var __util = new Util();
Util.prototype.escapeHtml = function (a, obj) {
for (var i = 0; i < a.length; i++) {
if (a[i] === obj) {
return true;
}
}
return false;
Util.prototype.escapeHtml = function (unsafe) {
return unsafe
.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
};
Util.prototype.showLoginNote = function() {
......
......@@ -231,7 +231,11 @@ ResponseHandler.prototype.processResource = function(index, resultItem, resultEl
"</h2>");
if (objects!=undefined && objects.length>0) {
itemContainer.append("<div class='search-result-objects'>" + objects + "</div>");
var innerContainer = $("<div class='search-result-objects'>");
for (var i=0; i<objects.length; i++) {
innerContainer.append($(objects[i]));
}
itemContainer.append(innerContainer);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment