mirror of
https://github.com/Dhghomon/easy_rust
synced 2024-11-17 15:29:51 +00:00
deploy: 773f02d4af
This commit is contained in:
parent
bfced0e1c9
commit
017c521ead
@ -145,6 +145,11 @@ window.search = window.search || {};
|
||||
url.push("");
|
||||
}
|
||||
|
||||
// encodeURIComponent escapes all chars that could allow an XSS except
|
||||
// for '. Due to that we also manually replace ' with its url-encoded
|
||||
// representation (%27).
|
||||
var searchterms = encodeURIComponent(searchterms.join(" ")).replace(/\'/g, "%27");
|
||||
|
||||
return '<a href="' + path_to_root + url[0] + '?' + URL_MARK_PARAM + '=' + searchterms + '#' + url[1]
|
||||
+ '" aria-details="teaser_' + teaser_count + '">' + result.doc.breadcrumbs + '</a>'
|
||||
+ '<span class="teaser" id="teaser_' + teaser_count + '" aria-label="Search Result Teaser">'
|
||||
|
Loading…
Reference in New Issue
Block a user