[svn r62754] Seems w3 have updated their HTML.

--HG--
branch : trunk
This commit is contained in:
guido 2009-03-09 13:55:00 +01:00
parent 5cbc7f34db
commit 092569a4c9
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ def check_html(string):
is_valid = get_validation_result_from_w3_html(ret) is_valid = get_validation_result_from_w3_html(ret)
return is_valid return is_valid
reg_validation_result = re.compile('<td[^>]*class="(in)?valid"[^>]*>([^<]*)<', reg_validation_result = re.compile(
re.M | re.S) '<(h2|td)[^>]*class="(in)?valid"[^>]*>([^<]*)<', re.M | re.S)
def get_validation_result_from_w3_html(html): def get_validation_result_from_w3_html(html):
match = reg_validation_result.search(html) match = reg_validation_result.search(html)
valid = match.group(1) is None valid = match.group(1) is None