Browse Source

Fixed img tags broken since PHP 5.5 patch

Signed-off-by: jdarwood007 <[email protected]>
Spuds 10 years ago
parent
commit
90ece4f28a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Sources/Subs-Post.php

+ 2 - 2
Sources/Subs-Post.php

@@ -357,7 +357,7 @@ function fixTags(&$message)
 		fixTag($message, $param['tag'], $param['protocols'], $param['embeddedUrl'], $param['hasEqualSign'], !empty($param['hasExtra']));
 
 	// Now fix possible security problems with images loading links automatically...
-	$message = preg_replace_callback('~(\[img.*?\])(.+?)\[/img\]~is', create_function('$m', '"$m[1]" . preg_replace("~action(=|%3d)(?!dlattach)~i", "action-", "$2") . "[/img]";'), $message);
+	$message = preg_replace_callback('~(\[img.*?\])(.+?)\[/img\]~is', create_function('$m', 'return "$m[1]" . preg_replace("~action(=|%3d)(?!dlattach)~i", "action-", "$m[2]") . "[/img]";'), $message);
 
 	// Limit the size of images posted?
 	if (!empty($modSettings['max_image_width']) || !empty($modSettings['max_image_height']))
@@ -2968,4 +2968,4 @@ function user_info_callback($matches)
 	return $use_ref ? $ref : $matches[0];
 }
 
-?>
+?>