When we regex-check the MIME header we should also support zero space between the type and the charset, say "text/html;charset=utf-8".

This commit is contained in:
Chi Ngan Lee 2018-02-09 11:22:17 +08:00
parent 307152202b
commit 87958400a1
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ defmodule Readability do
protect_attrs: ~r/^(?!id|rel|for|summary|title|href|src|alt|srcdoc)/i
]
@markup_mimes ~r/^(application|text)\/[a-z\-_\.\+]+ml(;\s+charset=.*)?$/i
@markup_mimes ~r/^(application|text)\/[a-z\-_\.\+]+ml(;\s*charset=.*)?$/i
@type html_tree :: tuple | list
@type raw_html :: binary