diff --git a/syntax_checkers/html.vim b/syntax_checkers/html.vim
index d9253929..a5dbfedf 100644
--- a/syntax_checkers/html.vim
+++ b/syntax_checkers/html.vim
@@ -37,33 +37,50 @@ function! s:TidyEncOptByFenc()
return get(tidy_opts, &fileencoding, '-utf8')
endfunction
+let s:ignore_html_errors = [
+ \ "
lacks \"summary\" attribute",
+ \ "not approved by W3C",
+ \ "attribute \"placeholder\"",
+ \ " proprietary attribute \"charset\"",
+ \ " lacks \"content\" attribute",
+ \ "inserting \"type\" attribute",
+ \ "proprietary attribute \"data-"
+ \]
+
+function! s:ValidateError(text)
+ let valid = 0
+ for i in s:ignore_html_errors
+ if stridx(a:text, i) != -1
+ let valid = 1
+ break
+ endif
+ endfor
+ return valid
+endfunction
+
+
function! SyntaxCheckers_html_GetLocList()
let encopt = s:TidyEncOptByFenc()
- "grep out not helpful errors and avoid reporting errors for new HTML5
- "attibutes (like 'data-' attibutes) and optional attributes like 'type' on
- "script and link tags.
- let ignore_html_errors = [
- \ " lacks \"summary\" attribute",
- \ "not approved by W3C",
- \ "attribute \"placeholder\"",
- \ " proprietary attribute \"charset\"",
- \ " lacks \"content\" attribute",
- \ " inserting \"type\" attribute",
- \ "