ignore script tag.

This commit is contained in:
mattn
2010-10-08 11:00:25 +09:00
parent 6d0c90f7d0
commit 97e438a40b

View File

@@ -1923,7 +1923,7 @@ function! s:get_text_from_html(buf)
let buf = a:buf
let buf = strpart(buf, stridx(buf, '</head>'))
let buf = substitute(buf, '<script>.\{-}</script>', '', 'g')
let buf = substitute(buf, '<script[^>]*>.\{-}</script>', '', 'g')
let res = ''
let max = 0
let mx = '\(<td[^>]\{-}>\)\|\(<\/td>\)\|\(<div[^>]\{-}>\)\|\(<\/div>\)'