File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
jvm/src/test/scala/scala/xml/parsing
shared/src/main/scala/scala/xml/parsing Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -91,4 +91,10 @@ class ConstructingParserTest {
91
91
val parser : ConstructingParser = ConstructingParser .fromSource(Source .fromString(xml), preserveWS = true )
92
92
parser.document().docElem // shouldn't crash
93
93
}
94
+
95
+ @ Test (expected = classOf [scala.xml.parsing.FatalError ])
96
+ def issue656 (): Unit = {
97
+ // mismatched quotes should not cause an infinite loop
98
+ XhtmlParser (Source .fromString(""" <html><body myAttribute='value"/></html>""" ))
99
+ }
94
100
}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ private[scala] trait MarkupParserCommon extends TokenTests {
67
67
val buf : StringBuilder = new StringBuilder
68
68
while (ch != endCh && ! eof) {
69
69
// well-formedness constraint
70
- if (ch == '<' ) reportSyntaxError (" '<' not allowed in attrib value" )
70
+ if (ch == '<' ) truncatedError (" '<' not allowed in attrib value" )
71
71
else if (ch == SU ) truncatedError(" " )
72
72
else buf.append(ch_returning_nextch)
73
73
}
You can’t perform that action at this time.
0 commit comments