Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. A Working Sample > Adding Support for Textile

5.11. Adding Support for Textile

Despite having separate paragraphs in the text area for the body attribute as shown in Figure 5-17, these newlines (that is, \n) are not rendered as line breaks or new paragraphs when the template is rendered in HTML.

You could use the helper simple_format, which appends a linebreak (that is, <br />) to each newline. When two consecutive newlines are found, the text before them, and the text after them, is wrapped in two separated pairs of paragraph tags. This fixes the "wall of text" issue, but you'd still be left with the issue of safely allowing innocuous HTML tags.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial