如何在jquery中使用换行符访问php值

I have following variable in php which is contains paragraph with line breaks. i need to put this $messagevalue in session and access the session in jquery.

Message from textarea look likes:

enter image description here

$message    = nl2br($_POST['message']); 
$_SESSION['message'] = $message; 

So when i access paragraph with line breaks it not working, but paragraph with out line breaks, it works. What the error here?

<script type="text/javascript">    
  $(document).ready(function () {
     var subject = "<?php if(isset($_SESSION['subject'])){echo $_SESSION['subject'];} ?>"
     alert(subject);
  });
</script>