Escape HTML when displaying search results
This commit is contained in:
@@ -134,9 +134,9 @@ script(type="text/template", id="hit-template")
|
||||
span free
|
||||
| {{/is_free}}
|
||||
.search-hit-name
|
||||
| {{{ _highlightResult.name.value }}}
|
||||
| {{ name }}
|
||||
.search-hit-meta
|
||||
span.project {{{ project.name }}} ·
|
||||
span.project {{ project.name }}
|
||||
span.node_type {{{ node_type }}}
|
||||
| {{#media}}
|
||||
span.media · {{{ media }}}
|
||||
|
@@ -96,7 +96,9 @@ script.
|
||||
limit: 10,
|
||||
templates: {
|
||||
suggestion: function (hit) {
|
||||
return hit._highlightResult.full_name.value + ' (' + hit._highlightResult.username.value + ')';
|
||||
var suggestion = hit.full_name + ' (' + hit.username + ')';
|
||||
var $p = $('p').text(suggestion);
|
||||
return $p.html();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -55,10 +55,10 @@ script(type="text/template", id="facet-template")
|
||||
script(type="text/template", id="hit-template")
|
||||
.search-hit.users(data-user-id='{{ objectID }}')
|
||||
.search-hit-name
|
||||
| {{{ _highlightResult.full_name.value }}}
|
||||
small ({{{ username }}})
|
||||
| {{ full_name }}
|
||||
small ({{ username }})
|
||||
.search-hit-roles
|
||||
| {{{ roles }}}
|
||||
| {{ roles }}
|
||||
|
||||
|
||||
// Pagination template
|
||||
|
Reference in New Issue
Block a user