# Mysql output

**URL:** <https://www.ruby-forum.com/t/mysql-output/119142>\
**Category:** Rails\
**Created:** [November 3, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/mysql-output/119142 "2007-11-03T18:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [November 3, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/mysql-output/119142/1 "2007-11-03T18:42:40Z")

</div>

I have a textarea where the users enter a list items in varying  
formats. This is then inserted to my DB. When I look at the input in  
the DB the format is the same as the users enters it which is fine.

## so the input could look like this:

item1  
item2  
item3

## some text here

However when I output it, it just outputs as a long string. I have  
tried using some JS to insert line breaks but my app just prints those  
out as well. Is there a way to tell my view to format my strings as  
HTML?

---

<div class="post-metadata">

**Author:** ![jimmygoogle](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/c67d28/32.png) [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Post date:** [November 3, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/mysql-output/119142/2 "2007-11-03T23:01:18Z")

</div>

On 3 Nov 2007, at 17:42, jimmygoogle wrote:

> * * *
> 
> However when I output it, it just outputs as a long string. I have  
> tried using some JS to insert line breaks but my app just prints those  
> out as well. Is there a way to tell my view to format my strings as  
> HTML?

Is simple\_format what you’re looking for ?

Fred
