Fix FormFinder callbacks for missing element_text

element_text added in:
51a06d8a ("Remove home-cooked htmlparser and use BeautifulSoup",
2019-07-22)
This commit is contained in:
Chris Mayo 2020-04-07 19:24:34 +01:00
parent 514210199d
commit 00f940d979

View file

@ -50,7 +50,7 @@ class FormFinder(object):
self.forms = []
self.form = None
def start_element(self, tag, attrs):
def start_element(self, tag, attrs, element_text=None):
"""Does nothing, override in a subclass."""
if tag == u'form':
if u'action' in attrs:
@ -69,10 +69,10 @@ class FormFinder(object):
log.warn(LOG_CHECK, "formless input´%s" % attrs)
pass
def start_end_element(self, tag, attrs):
def start_end_element(self, tag, attrs, element_text=None):
"""Delegate a combined start/end element (eg. <input .../>) to
the start_element method. Ignore the end element part."""
self.start_element(tag, attrs)
self.start_element(tag, attrs, element_text)
def end_element(self, tag):
"""search for ending form values."""