Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -73,7 +73,7 @@ class _Profanity extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
|
||||
/* Default sort options */
|
||||
$table->sortBy = $table->sortBy ?: 'type';
|
||||
$table->sortDirection = $table->sortDirection ?: 'desc';
|
||||
$table->sortDirection = $table->sortDirection ?: 'asc';
|
||||
|
||||
/* Filters */
|
||||
$table->filters = array(
|
||||
@@ -388,11 +388,11 @@ class _Profanity extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
|
||||
/* Gather up all URL's */
|
||||
$selector = new \DOMXPath($dom);
|
||||
$tags = $selector->query('//img | //a');
|
||||
$tags = $selector->query('//img | //a | //iframe');
|
||||
$good = NULL;
|
||||
foreach( $tags AS $tag )
|
||||
{
|
||||
if ( ( $tag->hasAttribute( 'href' ) and !$tag->hasAttribute( 'data-mentionid' ) ) OR $tag->hasAttribute( 'src' ) )
|
||||
if ( ( $tag->hasAttribute( 'href' ) and !$tag->hasAttribute( 'data-mentionid' ) ) OR ( $tag->hasAttribute( 'src' ) AND !$tag->hasAttribute( 'data-emoticon' ) ) )
|
||||
{
|
||||
if ( \IPS\Settings::i()->ipb_url_filter_option == 'none' )
|
||||
{
|
||||
@@ -419,15 +419,14 @@ class _Profanity extends \IPS\Patterns\ActiveRecord implements \JsonSerializable
|
||||
else if ( \IPS\Settings::i()->ipb_url_filter_option == 'white' )
|
||||
{
|
||||
/* @note http:// is hard-coded here as we're simply validating that the URL is on the same domain, so the protocol doesn't matter for the base_url replacement */
|
||||
if ( is_null( $good ) AND !preg_match( '/' . $url . '/i', str_replace( '<___base_url___>', 'http://' . parse_url( \IPS\Settings::i()->base_url, PHP_URL_HOST ), $urlToCheck ), $matches ) )
|
||||
if ( !preg_match( '/' . $url . '/i', str_replace( '<___base_url___>', 'http://' . parse_url( \IPS\Settings::i()->base_url, PHP_URL_HOST ), $urlToCheck ), $matches ) )
|
||||
{
|
||||
$good = FALSE;
|
||||
break 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$good = TRUE;
|
||||
break 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user