summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-25 20:23:01 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-25 20:23:01 +0000
commit2f2f288b8996578c3d22f0770706bd6ce1c4dc37 (patch)
treebe3c8df326dddfb63748c43f188b6a8afc02cf08 /libjava
parentba0fef142dcfc46b5c88d5cfd1fff278830ba537 (diff)
downloadlinaro-gcc-2f2f288b8996578c3d22f0770706bd6ce1c4dc37.tar.gz
linaro-gcc-2f2f288b8996578c3d22f0770706bd6ce1c4dc37.tar.bz2
linaro-gcc-2f2f288b8996578c3d22f0770706bd6ce1c4dc37.zip
2005-05-25 Chris Burdess <dog@gnu.org>
* gnu/xml/dom/ls/SAXEventSink.java: Ignore XML entities in start/ end entity callbacks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/gnu/xml/dom/ls/SAXEventSink.java17
2 files changed, 22 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index be3a5351fd5..717747ed972 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-25 Chris Burdess <dog@gnu.org>
+
+ * gnu/xml/dom/ls/SAXEventSink.java: Ignore XML entities in start/
+ end entity callbacks.
+
2005-05-24 Gary Benson <gbenson@redhat.com>
PR libgcj/21736:
diff --git a/libjava/gnu/xml/dom/ls/SAXEventSink.java b/libjava/gnu/xml/dom/ls/SAXEventSink.java
index 60b99d49305..2ff41910dd9 100644
--- a/libjava/gnu/xml/dom/ls/SAXEventSink.java
+++ b/libjava/gnu/xml/dom/ls/SAXEventSink.java
@@ -366,6 +366,14 @@ class SAXEventSink
ctx = doctype;
return;
}
+ if ("lt".equals(name) ||
+ "gt".equals(name) ||
+ "amp".equals(name) ||
+ "apos".equals(name) ||
+ "quot".equals(name))
+ {
+ return;
+ }
// Get entity
NamedNodeMap entities = doctype.getEntities();
Entity entity = (Entity) entities.getNamedItem(name);
@@ -385,6 +393,15 @@ class SAXEventSink
// Ignore DTD and parameter entities
return;
}
+ if ("lt".equals(name) ||
+ "gt".equals(name) ||
+ "amp".equals(name) ||
+ "apos".equals(name) ||
+ "quot".equals(name))
+ {
+ return;
+ }
+ // Get entity
Entity entity = popEntity();
// TODO resolve external entities to ensure that entity has content
if (expandEntityReferences)