Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 4 WYSIWYG Bootsy not displaying formatting

I've just followed the install instructions at the the bootsy gem page and it all looks good until I save and look at the post's content.

This is what the output looks like in the view:

<h2>Header</h2><h3>Sub head:</h3><br><img alt="Thumb 1320236280147" src="/uploads/bootsy/image/1/1320236280147.jpg">

It seems that none of the html formatting is being rendered as it is being escaped by quoation marks or something like that - has anyone else had this problem? I haven't seen any issues on the github page or on SO to point me in the right direction.

I haven't done anything yet apart from follow the gem install instructions but maybe I missed something or am just making a stupid mistake.

If there's anything else you want to know please just ask.

Cheers

like image 946
VoA Avatar asked Oct 27 '14 19:10

VoA


1 Answers

You need to have something like this, escape html:

<%= f.bootsy_area(:body, class: 'bg-code').html_safe %>

like image 187
Sergio Mironescu Iancu Avatar answered Nov 14 '22 21:11

Sergio Mironescu Iancu