Closed webaddicto closed 7 years ago
In the last commit I updated the regex to better extract the url from the meta refresh, example:
<META http-equiv="refresh" content="0;URL='http://www.website.com/'">
<META http-equiv="refresh" content="0;URL='http://www.website.com/'">
<meta http-equiv="refresh" content='0; url='/baidu.html?from=noscript"'/>
<noscript><META http-equiv="refresh" content="0;URL='http://www.website.com/'"></noscript>
<noscript><META http-equiv="refresh" content="0;URL='http://www.website.com/'"></noscript>
<noscript><META http-equiv="refresh" content="0;URL=http://www.website.com"/></noscript>
Will extract the url on $matches[3]
like this:
Array
(
[0] => <META http-equiv="refresh" content="0;URL='http://www.website.com/'"
[1] => "
[2] => '
[3] => http://www.website.com/
[4] => '
)
Array
(
[0] => <META http-equiv="refresh" content="0;URL='http://www.website.com/'"
[1] => "
[2] => '
[3] => http://www.website.com/
[4] => '
)
Array
(
[0] => <meta http-equiv="refresh" content='0; url='/baidu.html?from=noscript"'
[1] => '
[2] => '
[3] => /baidu.html?from=noscript
[4] => "
)
Array
(
[0] => <META http-equiv="refresh" content="0;URL='http://www.website.com/'"
[1] => "
[2] => '
[3] => http://www.website.com/
[4] => '
)
Array
(
[0] => <META http-equiv="refresh" content="0;URL='http://www.website.com/'"
[1] => "
[2] => '
[3] => http://www.website.com/
[4] => '
)
Array
(
[0] => <META http-equiv="refresh" content="0;URL=http://www.website.com"
[1] => "
[2] =>
[3] => http://www.website.com
[4] =>
)
Added by the author on commit f182fd0
Make sure to proxify also URL inside meta http-equiv="refresh", i.e:
<meta http-equiv="refresh" content="0; url=/baidu.html?from=noscript"/>