diff --git a/install/fixSlashN.php b/install/fixSlashN.php index 58f37f0f4339..56d20b5d33cf 100644 --- a/install/fixSlashN.php +++ b/install/fixSlashN.php @@ -11,10 +11,15 @@ $count = 0; foreach ($videos as $value) { $count++; - $newDescription = str_replace('\n', PHP_EOL, $value['description']); + //$newDescription = str_replace('\n', PHP_EOL, $value['description']); + $newDescription = preg_replace('/(\\\\)+n/', PHP_EOL, $value['description']); + $newDescription = preg_replace('/(\\\\)+/', PHP_EOL, $newDescription); + $newTitle = preg_replace('/(\\\\)+/', '', $value['title']); + if($newDescription !== $value['description']){ echo "Change ($count) [{$value['id']}]{$value['title']} ******".PHP_EOL; $video = new Video('','',$value['id']); + $video->setTitle($newTitle); $video->setDescription($newDescription); $video->save(false, true); }else{