We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents afed55b + 5f0a426 commit 1f25c8bCopy full SHA for 1f25c8b
src/librustdoc/html/static/main.js
@@ -386,12 +386,16 @@
386
});
387
}
388
389
+ function escape(content) {
390
+ return $('<h1/>').text(content).html();
391
+ }
392
+
393
function showResults(results) {
394
var output, shown, query = getQuery();
395
396
currentResults = query.id;
- output = '<h1>Results for ' + query.query +
- (query.type ? ' (type: ' + query.type + ')' : '') + '</h1>';
397
+ output = '<h1>Results for ' + escape(query.query) +
398
+ (query.type ? ' (type: ' + escape(query.type) + ')' : '') + '</h1>';
399
output += '<table class="search-results">';
400
401
if (results.length > 0) {
@@ -650,4 +654,3 @@
650
654
651
655
window.initSearch = initSearch;
652
656
}());
653
-
0 commit comments