16 lines
927 B
Diff
16 lines
927 B
Diff
# must fail: dash_adjacency_cdata
|
|
# a CDATA section read (dash_read::read_xml)
|
|
diff --git a/wai/wai-rs/src/http_binding/dash_read.rs b/wai/wai-rs/src/http_binding/dash_read.rs
|
|
index 79d55df6..c268e915 100644
|
|
--- a/wai/wai-rs/src/http_binding/dash_read.rs
|
|
+++ b/wai/wai-rs/src/http_binding/dash_read.rs
|
|
@@ -248,6 +248,9 @@ pub fn read_xml(text: &str) -> Result<Element, PlaylistError> {
|
|
Some(parent) => parent.children.push(e),
|
|
None => done = Some(e),
|
|
}
|
|
+ } else if r.rest().starts_with("<![CDATA[") {
|
|
+ let end = r.rest().find("]]>").unwrap_or(0);
|
|
+ r.at += end + 3;
|
|
} else if r.rest().starts_with("<!") || r.rest().starts_with("<?") {
|
|
return Err(malformed("a declaration, CDATA section or processing instruction is outside the subset"));
|
|
} else {
|