mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
add some UTF-8 validation
This commit is contained in:
@@ -23,6 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\item;
|
||||
|
||||
use pocketmine\utils\Utils;
|
||||
|
||||
class WritableBookPage{
|
||||
|
||||
/** @var string */
|
||||
@@ -31,7 +33,8 @@ class WritableBookPage{
|
||||
private $photoName;
|
||||
|
||||
public function __construct(string $text, string $photoName = ""){
|
||||
//TODO: data validation, encoding checks
|
||||
//TODO: data validation
|
||||
Utils::checkUTF8($text);
|
||||
$this->text = $text;
|
||||
$this->photoName = $photoName;
|
||||
}
|
||||
|
Reference in New Issue
Block a user