diff --git a/includes/class-mention.php b/includes/class-mention.php index d55e5f2..beb6246 100644 --- a/includes/class-mention.php +++ b/includes/class-mention.php @@ -26,6 +26,10 @@ class Mention { * @return string the filtered post-content */ public static function the_content( $the_content ) { + // small protection against execution timeouts: limit to 1 MB + if ( mb_strlen( $the_content ) > MB_IN_BYTES ) { + return $the_content; + } $tag_stack = array(); $protected_tags = array( 'pre',