Version 3.4.8

This commit is contained in:
Neo committed 2025-12-19 00:42:42 -08:00
1 parent b45ea0dffb
commit c603205a25
1398 files changed
+36675 -31023

No files matched your search

+18 -8
View File
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* IP.Board v3.4.8
* HTML parsing core
* Last Updated: $Date: 2012-06-08 09:28:02 +0100 (Fri, 08 Jun 2012) $
* </pre>
@@ -378,6 +378,12 @@ class classes_text_parser
$close = $val[1];
$content = $val[2];
// Leave emoticons from legacy versions alone.
if ( stripos( $all, '<#EMO_DIR#>' ) !== false )
{
continue;
}
$html = str_replace( $all, '', $html );
}
}
@@ -1070,9 +1076,10 @@ class classes_text_parser
* Replace bad words
*
* @param string Raw text
* @param bool If a URL is not allowed due to white/blacklist, the URL should be checked. See ticket 883140 & Line 1370 of classes_text_parser_bbcode
* @return string Converted text
*/
public function parseBadWords( $text='' )
public function parseBadWords( $text='', $stripUrls = TRUE )
{
/* @link http://community.invisionpower.com/resources/bugs.html/_/ip-board/report-center-bypass-word-filter-r40719 */
if( self::$Perms['memberData']['member_group_id'] AND !self::$Perms['memberData']['g_id'] )
@@ -1102,14 +1109,17 @@ class classes_text_parser
}
/* strip out URLs so replacements aren't made */
preg_match_all( '#((http|https|news|ftp)://(?:[^<>\)\[\"\s]+|[a-zA-Z0-9/\._\-!&\#;,%\+\?:=]+))#is', $text, $matches );
foreach( $matches[0] as $m )
if ( $stripUrls )
{
$c = count( $urls );
$urls[ $c ] = $m;
preg_match_all( '#((http|https|news|ftp)://(?:[^<>\)\[\"\s]+|[a-zA-Z0-9/\._\-!&\#;,%\+\?:=]+))#is', $text, $matches );
foreach( $matches[0] as $m )
{
$c = count( $urls );
$urls[ $c ] = $m;
$text = str_replace( $m, '<!--url{' . $c . '}-->', $text );
$text = str_replace( $m, '<!--url{' . $c . '}-->', $text );
}
}
//-----------------------------------------