From 07f501408f3a3e4b8c123f8ff0c40d4145edd5e9 Mon Sep 17 00:00:00 2001 From: Ivan Nieto Vivanco Date: Sun, 12 Feb 2023 17:40:04 -0600 Subject: [PATCH] Add migration to fix already escaped formats in the database --- ...4353_fix_unescaped_customfields_format.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 database/migrations/2023_02_12_224353_fix_unescaped_customfields_format.php diff --git a/database/migrations/2023_02_12_224353_fix_unescaped_customfields_format.php b/database/migrations/2023_02_12_224353_fix_unescaped_customfields_format.php new file mode 100644 index 0000000000..f1779e996a --- /dev/null +++ b/database/migrations/2023_02_12_224353_fix_unescaped_customfields_format.php @@ -0,0 +1,33 @@ +get(); + + foreach($customfields as $customfield){ + $customfield->update(['format' => html_entity_decode($customfield->format)]); + } + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +}