Skip to content

Commit

Permalink
fix: add slashes to notification JSON before saving it in posts table
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartui committed Nov 21, 2024
1 parent a679de2 commit b0d2a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Database/NotificationDatabaseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static function upsert(Notification $notification)
/**
* @todo Remove backward compatibility content save.
*/
'post_content' => $notification->to('json'),
'post_content' => wp_slash($notification->to('json')),
'post_status' => $notification->isEnabled() ? 'publish' : 'draft',
'post_type' => 'notification',
]
Expand Down

0 comments on commit b0d2a41

Please sign in to comment.