문제

I am passing to my partial a form instance and an additional object. What I want is to display to the end user entered content preserving such simbols as \r \n \t etc. How can I achieve that? Tried to get raw values of the form or object, but no luck.

inputed text:

    test is what I need.   Some stuff like this shouldnt happen at all
------------------------------------------------------------------
Okay\t          Test\r\n
1132\t          123\r\n

The problem with spaces is obvious, but how to preserve the example structure is the question.

도움이 되었습니까?

해결책

The solution was quite simple. Wrapping the raw output in a <pre> tag helped in my case

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top