You can escape quote characters with addslashes()<button id="submit_btn" onclick="submitData('{{addslashes($data)}}')">Save Data</bu
https://stackoverflow.com/questions/54093308/handle-special-character-in-laravel-blade-template