Skip to content

Commit 91da733

Browse files
authored
Merge pull request #96 from scrapy/handle_uppercase_script_tags
Handle uppercase script tags
2 parents fa30488 + 49f03f8 commit 91da733

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scrapely/_htmlpage.pyx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,14 @@ cdef class ScriptParser:
139139
cdef int parse(self, Py_UCS4 c, int i):
140140
if self.state == 10:
141141
self.state = 1
142-
143142
if ((self.state == 1 and c == u'<') or
144143
(self.state == 2 and c == u'/') or
145-
(self.state == 3 and c == u's') or
146-
(self.state == 4 and c == u'c') or
147-
(self.state == 5 and c == u'r') or
148-
(self.state == 6 and c == u'i') or
149-
(self.state == 7 and c == u'p') or
150-
(self.state == 8 and c == u't') or
144+
(self.state == 3 and c == u's' or c == u'S') or
145+
(self.state == 4 and c == u'c' or c == u'C') or
146+
(self.state == 5 and c == u'r' or c == u'R') or
147+
(self.state == 6 and c == u'i' or c == u'I') or
148+
(self.state == 7 and c == u'p' or c == u'P') or
149+
(self.state == 8 and c == u't' or c == u'T') or
151150
(self.state == 9 and c == u'>')):
152151
self.state += 1
153152
else:

0 commit comments

Comments
 (0)