diff --git a/public/javascripts/widgets/search.js b/public/javascripts/widgets/search.js index 831463074..7028750f3 100644 --- a/public/javascripts/widgets/search.js +++ b/public/javascripts/widgets/search.js @@ -32,9 +32,9 @@ return Diaspora.I18n.t("search_for", row); } else { return $("", { - 'class': "avatar", + "class": "avatar", src: row.avatar - }).html() + row.name; + })[0].outerHTML + row.name; } }; @@ -63,11 +63,11 @@ if (data['search'] === true) { // The placeholder "search for" result window.location = self.searchFormAction + '?' + self.searchInputName + '=' + data['name']; } else { // The actual result - element.val(formatted); + self.options.element.val(formatted); window.location = data['url']; } }; }; Diaspora.Widgets.Search = Search; -})(); \ No newline at end of file +})();