mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-23 23:21:00 +01:00
Fixed RXSS vulnerability in search results
This commit is contained in:
parent
89c1d1cdc5
commit
a06cf106ab
File diff suppressed because one or more lines are too long
29
material/templates/assets/javascripts/bundle.471ce7a9.min.js
vendored
Normal file
29
material/templates/assets/javascripts/bundle.471ce7a9.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -249,7 +249,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.20f8b5b3.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.471ce7a9.min.js' | url }}"></script>
|
||||
{% for script in config.extra_javascript %}
|
||||
{{ script | script_tag }}
|
||||
{% endfor %}
|
||||
|
@ -20,6 +20,7 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import escapeHTML from "escape-html"
|
||||
import { ComponentChild } from "preact"
|
||||
|
||||
import { configuration, feature, translation } from "~/_"
|
||||
@ -60,7 +61,7 @@ function renderSearchDocument(
|
||||
const missing = Object.keys(document.terms)
|
||||
.filter(key => !document.terms[key])
|
||||
.reduce<ComponentChild[]>((list, key) => [
|
||||
...list, <del>{key}</del>, " "
|
||||
...list, <del>{escapeHTML(key)}</del>, " "
|
||||
], [])
|
||||
.slice(0, -1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user