Browse Source

sanitizeMSCutPaste should return $ string, otherwise parse_bbc will mess up when message is === false

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
1882c5c121
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Sources/Subs.php

+ 3 - 3
Sources/Subs.php

@@ -848,7 +848,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 	// Don't waste cycles
 	if ($message === '')
 		return '';
-		
+
 	// Just in case it wasn't determined yet whether UTF-8 is enabled.
 	if (!isset($context['utf8']))
 		$context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';
@@ -862,7 +862,7 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
 		$context['disabled_parse_bbc'] = true;
 		return $message;
 	}
-	
+
 	// Never show smileys for wireless clients.  More bytes, can't see it anyway :P.
 	if (WIRELESS)
 		$smileys = false;
@@ -4084,7 +4084,7 @@ function sanitizeMSCutPaste($string)
 	global $context;
 	
 	if (empty($string))
-		return;
+		return $string;
 		
 	// UTF-8 occurences of MS special characters
 	$findchars_utf8 = array(