Mentions: 1MB limit for attempting to link mentions, otherwise bail (#540)
This commit is contained in:
parent
70cefc9712
commit
eda6d6d785
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,10 @@ class Mention {
|
||||||
* @return string the filtered post-content
|
* @return string the filtered post-content
|
||||||
*/
|
*/
|
||||||
public static function the_content( $the_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();
|
$tag_stack = array();
|
||||||
$protected_tags = array(
|
$protected_tags = array(
|
||||||
'pre',
|
'pre',
|
||||||
|
|
Loading…
Reference in a new issue