mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 10:23:16 +09:00
Merge pull request #429 from conory/develop
아이프레임, 오브젝트 태그 src에서 http 가 없으면 무조건 필터 되는 문제 수정
This commit is contained in:
commit
cfba57979f
1 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ class MediaFilter
|
|||
*/
|
||||
public static function formatPrefix($prefix)
|
||||
{
|
||||
$prefix = preg_match('@^https?://(.*)$@i', $prefix, $matches) ? $matches[1] : $prefix;
|
||||
$prefix = preg_match('@^(https?:)?//(.*)$@i', $prefix, $matches) ? $matches[2] : $prefix;
|
||||
if (strpos($prefix, '/') === false)
|
||||
{
|
||||
$prefix .= '/';
|
||||
|
|
@ -117,7 +117,7 @@ class MediaFilter
|
|||
{
|
||||
$result[] = str_replace('\*\.', '[a-z0-9-]+\.', preg_quote($domain, '%'));
|
||||
}
|
||||
return '%^https?://(' . implode('|', $result) . ')%';
|
||||
return '%^(https?:)?//(' . implode('|', $result) . ')%';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -150,7 +150,7 @@ class MediaFilter
|
|||
{
|
||||
$result[] = str_replace('\*\.', '[a-z0-9-]+\.', preg_quote($domain, '%'));
|
||||
}
|
||||
return '%^https?://(' . implode('|', $result) . ')%';
|
||||
return '%^(https?:)?//(' . implode('|', $result) . ')%';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue