Skip to content

Commit eeb215f

Browse files
author
bors-servo
authored
Auto merge of servo#145 - upsuper:string-escape, r=SimonSapin
Treat \n and \r same as other escaped characters b'\n' and b'\r' should be serialized to '\\a ' and '\\d ' respectively, rather than '\\A ' and '\\D '. Simply let them be treated the same way as other escaped character should be fine. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/145) <!-- Reviewable:end -->
2 parents af83617 + 2555d24 commit eeb215f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/serializer.rs

-2
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,6 @@ impl<'a, W> fmt::Write for CssStringWriter<'a, W> where W: fmt::Write {
253253
let escaped = match b {
254254
b'"' => Some("\\\""),
255255
b'\\' => Some("\\\\"),
256-
b'\n' => Some("\\A "),
257-
b'\r' => Some("\\D "),
258256
b'\0' => Some("\u{FFFD}"),
259257
b'\x01'...b'\x1F' | b'\x7F' => None,
260258
_ => continue,

0 commit comments

Comments
 (0)