[librsvg: 43/48] Support <xi:include parse="text"> inclusions
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 43/48] Support <xi:include parse="text"> inclusions
- Date: Sat, 17 Nov 2018 10:23:38 +0000 (UTC)
commit 65f77e16da146804435fd1d46f3b736f3fd7d66a
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Nov 16 11:40:54 2018 -0600
Support <xi:include parse="text"> inclusions
rsvg_internals/src/xml.rs | 2 +-
tests/fixtures/loading/include-text.svg | 6 ++++++
tests/fixtures/loading/text.txt | 1 +
3 files changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index 253c2be6..ace253b7 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -361,7 +361,7 @@ impl XmlState {
()
})?;
- self.characters(&utf8_data);
+ self.element_creation_characters(&utf8_data);
Ok(())
}
diff --git a/tests/fixtures/loading/include-text.svg b/tests/fixtures/loading/include-text.svg
new file mode 100644
index 00000000..181a25cb
--- /dev/null
+++ b/tests/fixtures/loading/include-text.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ width="320" height="240">
+ <text x="10" y="100"><xi:include href="text.txt" parse="text" encoding="UTF-8"/></text>
+</svg>
diff --git a/tests/fixtures/loading/text.txt b/tests/fixtures/loading/text.txt
new file mode 100644
index 00000000..802992c4
--- /dev/null
+++ b/tests/fixtures/loading/text.txt
@@ -0,0 +1 @@
+Hello world
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]