stevec
stevec

Reputation: 52787

Dealing with new line character in rails form_for text_area?

What is best practice for dealing with new line characters in text_area within form_for?

I noticed \r\n is how it is represented. I believe that is a carriage return (a new line that will be recognised on all operating systems).

Can this cause issues? Is it better practice to substitute it for \n which is what many programmers would consider the correct representation of a new line?

My reason for asking is simply to ensure I don't create problems later down the track that could have been averted with some foresight and inquisition.

Upvotes: 1

Views: 50

Answers (0)

Related Questions