Skip to content

Commit

Permalink
Fix #24872, XSS in docs not found page.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-morgan committed Apr 28, 2015
1 parent 5fb0259 commit 928bd4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/doc/not_found.md
Expand Up @@ -57,8 +57,12 @@ function populate_rust_search() {

// #18540, use a single token

var a = document.createElement("a");
a.href = "http://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
a.textContent = lt;
var search = document.getElementById('core-search');
search.innerHTML = "<a href=\"http://doc.rust-lang.org/core/?search=" + lt + "\">" + lt + "</a>";
search.innerHTML = "";
search.appendChild(a);
}
populate_site_search();
populate_rust_search();
Expand Down

0 comments on commit 928bd4f

Please sign in to comment.