Don't escape single quotes
This commit is contained in:
parent
181bb0583e
commit
ac259ebe47
1 changed files with 3 additions and 2 deletions
|
@ -150,10 +150,12 @@ impl PreEscaped<String> {
|
||||||
/// * `<` is escaped as `<`
|
/// * `<` is escaped as `<`
|
||||||
/// * `>` is escaped as `>`
|
/// * `>` is escaped as `>`
|
||||||
/// * `"` is escaped as `"`
|
/// * `"` is escaped as `"`
|
||||||
/// * `'` is escaped as `'`
|
|
||||||
///
|
///
|
||||||
/// All other characters are passed through unchanged.
|
/// All other characters are passed through unchanged.
|
||||||
///
|
///
|
||||||
|
/// **Note:** In versions prior to 0.13, the single quote (`'`) was
|
||||||
|
/// escaped as well.
|
||||||
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -180,7 +182,6 @@ impl<'a> fmt::Write for Escaper<'a> {
|
||||||
b'<' => self.0.push_str("<"),
|
b'<' => self.0.push_str("<"),
|
||||||
b'>' => self.0.push_str(">"),
|
b'>' => self.0.push_str(">"),
|
||||||
b'"' => self.0.push_str("""),
|
b'"' => self.0.push_str("""),
|
||||||
b'\'' => self.0.push_str("'"),
|
|
||||||
_ => unsafe { self.0.as_mut_vec().push(b) },
|
_ => unsafe { self.0.as_mut_vec().push(b) },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue