修复后台单引号 html encode 问题

This commit is contained in:
Edward Yang 2023-02-12 20:23:10 +08:00
parent 26d8f562ee
commit 1675a07c9b
4 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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),
];
}