rustdoc: HTML escape codeblocks which fail syntax highlighting
This commit is contained in:
parent
31dd4f4acb
commit
baf2921ebc
2 changed files with 9 additions and 1 deletions
|
@ -25,3 +25,11 @@ pub fn quux() {}
|
|||
/// \_
|
||||
/// ```
|
||||
pub fn ok() {}
|
||||
|
||||
// @has bad_codeblock_syntax/fn.escape.html
|
||||
// @has - '//*[@class="docblock"]/pre/code' '\_ <script>alert("not valid Rust");</script>'
|
||||
/// ```
|
||||
/// \_
|
||||
/// <script>alert("not valid Rust");</script>
|
||||
/// ```
|
||||
pub fn escape() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue