You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the wiki content contains newlines, then those get rendered as such by Erubis (RoR 3's ERB engine), and then get "correctly" indented in the produced HTML code. The following line is responsible for this:
______<p>Content:<br /><textarea cols="40" id="page_content" name="page[content]" rows="20">First Line
________Second Line</textarea>
(the leading spaces above have been replaced by underscores). The problem is, that the spaces in front of "Second Line" will appear inside the textarea in the browser. And when the user submits the content as it is, those spaces will get added to the respectiv database wiki_page row.
I've googled around for two hours or so, and there seem to be other people having the same problem with ERB and f.textarea, however no solution for ERB/Erubis seems to be known.
The text was updated successfully, but these errors were encountered:
When the wiki content contains newlines, then those get rendered as such by Erubis (RoR 3's ERB engine), and then get "correctly" indented in the produced HTML code. The following line is responsible for this:
irwi/app/views/base_wiki_pages/edit.html.erb:16
<p><%=wt 'Content:' %><br /><%= f.text_area :content %></p>
The produced HTML looks like this:
______<p>Content:<br /><textarea cols="40" id="page_content" name="page[content]" rows="20">First Line
________Second Line</textarea>
(the leading spaces above have been replaced by underscores). The problem is, that the spaces in front of "Second Line" will appear inside the textarea in the browser. And when the user submits the content as it is, those spaces will get added to the respectiv database wiki_page row.
I've googled around for two hours or so, and there seem to be other people having the same problem with ERB and f.textarea, however no solution for ERB/Erubis seems to be known.
The text was updated successfully, but these errors were encountered: