File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -260,6 +260,9 @@ function next(o::Raw)
260
260
elseif c3 === ' D'
261
261
type = RawDTD
262
262
j = findnext (== (UInt8 (' >' )), data, i)
263
+ while sum (== (UInt8 (' >' )), data[i: j]) != sum (== (UInt8 (' <' )), data[i: j])
264
+ j = findnext (== (UInt8 (' >' )), data, j + 1 )
265
+ end
263
266
end
264
267
elseif c2 === ' ?'
265
268
if get_name (data, i + 2 )[1 ] == " xml"
Original file line number Diff line number Diff line change 169
169
o[" id" ] = 1
170
170
@test o[" id" ] == " 1"
171
171
end
172
+
173
+ # -----------------------------------------------------------------------------# Issues
174
+ @testset " Issues" begin
175
+ # 12
176
+ s = """
177
+ <?xml version="1.0" encoding="UTF-8"?>
178
+
179
+ <!DOCTYPE note [
180
+ <!ENTITY nbsp " ">
181
+ <!ENTITY writer "Writer: Donald Duck.">
182
+ <!ENTITY copyright "Copyright: W3Schools.">
183
+ ]>
184
+
185
+ <note>
186
+ <to>Tove</to>
187
+ <from>Jani</from>
188
+ <heading>Reminder</heading>
189
+ <body>Don't forget me this weekend!</body>
190
+ <footer>&writer; ©right;</footer>
191
+ </note>
192
+ """
193
+
194
+ doc = parse (s, Node)
195
+ @test value (doc[2 ]) == """ note [
196
+ <!ENTITY nbsp " ">
197
+ <!ENTITY writer "Writer: Donald Duck.">
198
+ <!ENTITY copyright "Copyright: W3Schools.">
199
+ ]"""
200
+ end
You can’t perform that action at this time.
0 commit comments