Force space after /me to prevent posting "as someone else"

This commit is contained in:
Daniel Winzen
2016-12-30 07:19:18 +01:00
parent 208c354284
commit 5c32a8859f

View File

@ -2890,8 +2890,8 @@ function validate_input(){
} }
} }
if($poststatus!==9 && preg_match('~^/me~iu', $message)){ if($poststatus!==9 && preg_match('~^/me~iu', $message)){
$displaysend=style_this(htmlspecialchars($U['nickname']), $U['style']); $displaysend=style_this(htmlspecialchars("$U[nickname] "), $U['style']);
$message=preg_replace("~^/me~iu", '', $message); $message=preg_replace("~^/me\s?~iu", '', $message);
} }
$message=apply_filter($message, $poststatus, $U['nickname']); $message=apply_filter($message, $poststatus, $U['nickname']);
$message=create_hotlinks($message); $message=create_hotlinks($message);