CruGlobal/mpdx — pull request #212 by draffensperger (2014-12-13 00:53:55+00:00)
Title: Format both multi-line and long single-line activity comments well 

How it looks currently with the default HTML `white-space: normal`
![screenshot-1418429281](https://cloud.githubusercontent.com/assets/2855507/5421770/6e713f90-8238-11e4-99fb-349ffc268bc4.png)

How it looks with `white-space: pre` which I tried earlier and which generated complaints about the text not wrapping. It shows he multi-line comment fine, but the comment which spans a long line gets pushed out of the comment box:
![screenshot-1418430828](https://cloud.githubusercontent.com/assets/2855507/5421771/7715bec8-8238-11e4-87cc-d21b38e966be.png)

However, there is another option, `white-space: pre-wrap` which causes the text to wrap at the edge of the box and for line breaks within it. Both the comment with line breaks and the long single line comment look good:
![screenshot-1418430950](https://cloud.githubusercontent.com/assets/2855507/5421773/7b7c509e-8238-11e4-9c14-21aaf5adafd1.png)

The other way to do this would rather than setting a CSS style would be to use Rails `simple_format` function (http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format), but an issue with that is that the comment body gets passed to AngularJS after which it would escape any HTML characters in it for security and correct display purposes. If we made it so that it didn't escape HTML characters, we would need to be very careful so as not to create problems form comments with escape characters in them (and need to beware of XSS attacks).

There would be the potential to use Angular code to simulate the effect of `simple_format` (e.g. https://github.com/RStankov/angular-simple-format), but in my opinion a simple CSS rule of `text:pre-wrap` will accomplish our goal in a simple and elegant way. But let me know if we should do it otherwise.