FIX: Adds test case for escape_xml function
This commit is contained in:
@@ -16,10 +16,9 @@ fn test_escape_xml() {
|
|||||||
escape_xml("This is <>&\"' say"),
|
escape_xml("This is <>&\"' say"),
|
||||||
"This is <>&"' say"
|
"This is <>&"' say"
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// '&' => "&"
|
assert_eq!(
|
||||||
// '<' "<")
|
escape_xml("One line\nanother line\n\r"),
|
||||||
// '>' => ">"
|
"One line
another line

"
|
||||||
// '"' => """
|
);
|
||||||
// '\'' => "'"
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user