ok, I just found a way better way.

Put the CSS "white-space: pre-wrap" for the subject, and you can just get textContent, it will contain the "\n" that we want. see http://jsfiddle.net/Q3cvr/ and open your devtools' console to check this.