diff --git a/beike/Admin/View/Components/Form/Input.php b/beike/Admin/View/Components/Form/Input.php index 1e9c4361..521bf2d0 100644 --- a/beike/Admin/View/Components/Form/Input.php +++ b/beike/Admin/View/Components/Form/Input.php @@ -26,7 +26,7 @@ class Input extends Component { $this->name = $name; $this->title = $title; - $this->value = html_entity_decode($value); + $this->value = html_entity_decode($value, ENT_QUOTES); $this->error = $error; $this->width = $width; $this->type = $type; diff --git a/beike/Admin/View/Components/Form/RichText.php b/beike/Admin/View/Components/Form/RichText.php index 75c84b10..f161187f 100644 --- a/beike/Admin/View/Components/Form/RichText.php +++ b/beike/Admin/View/Components/Form/RichText.php @@ -18,7 +18,7 @@ class RichText extends Component { $this->name = $name; $this->title = $title; - $this->value = html_entity_decode($value); + $this->value = html_entity_decode($value, ENT_QUOTES); $this->required = $required; } diff --git a/beike/Admin/View/Components/Form/Textarea.php b/beike/Admin/View/Components/Form/Textarea.php index b4767b41..b0ed7ef1 100644 --- a/beike/Admin/View/Components/Form/Textarea.php +++ b/beike/Admin/View/Components/Form/Textarea.php @@ -18,7 +18,7 @@ class Textarea extends Component { $this->name = $name; $this->title = $title; - $this->value = html_entity_decode($value); + $this->value = html_entity_decode($value, ENT_QUOTES); $this->required = $required; } diff --git a/beike/Console/Commands/MigrateFromOpenCart.php b/beike/Console/Commands/MigrateFromOpenCart.php index 15f55827..da8fedf3 100644 --- a/beike/Console/Commands/MigrateFromOpenCart.php +++ b/beike/Console/Commands/MigrateFromOpenCart.php @@ -104,7 +104,7 @@ class MigrateFromOpenCart extends Command 'category_id' => $description->category_id, 'locale' => $langMapping[$description->language_id], 'name' => $description->name, - 'content' => html_entity_decode($description->description), + 'content' => html_entity_decode($description->description, ENT_QUOTES), 'created_at' => now(), 'updated_at' => now(), ]; @@ -283,7 +283,7 @@ class MigrateFromOpenCart extends Command $ocDescription = $ocDescriptions[self::LANG_MAPPING[$locale['code']]]; $descriptions[$locale['code']] = [ 'name' => $ocDescription->name, - 'content' => html_entity_decode($ocDescription->description), + 'content' => html_entity_decode($ocDescription->description, ENT_QUOTES), ]; }