similar to: Convert \n newlines to html <br>

Displaying 20 results from an estimated 2000 matches similar to: "Convert \n newlines to html <br>"

2005 Dec 21
8
textilize - redcloth
Hi, I''m using textilize with redcloth 3.0.4. Everything works best except that paragraphs are not translated as an HTML paragraph When I write something like: *first paragraph* second paragraph the output is without paragraph: *first paragraph* second paragraph Any help??? Thanks Jörg
2007 Jan 16
1
<BR> and <P> in RedCloth v. Textism
Hi, I''m using RedCloth right now for some simple markup in a Rails project. It''s simple and easy - thanks for a great tool! I have a question about an apparent discrepancy between RedCloth and Textile, relating to newline characters. I''ve played with the "hard_breaks" feature and that seems to generate it''s own problems.. If I go onto the Textile
2006 Mar 25
2
Textilize problems with line breaks
I''m having a problem formatting some text. I have a textarea that I input my text into, which will then be put into an e-mail and sent out. The problem I am having is when there is a single line break. Multiple line breaks work fine (hitting enter twice), but single line breaks don''t seem to work properly. Take the following input: Line1. Line2. Line3. Line4. Using
2006 Mar 09
2
How to keep formatting of text in textarea?
Hi! I''ve got a form for creating news and i''d like to keep formatting of the text in the textarea - if user presses enter twice, or presses space ten times it should be visible when editing or showing the news. Probably i should add before_save filter and some regexps for adding html tags, but i know almost nothing about regexp. Maybe there''s a simpler way also.
2002 Aug 27
1
RSync and translation
Yeah or Nay... I have a directory like this on box Y... ALBERT BRADLEY CHARLEY and I want rsync to transfer and translate this into... A/ALBERT B\BRADLEY C\CHARLEY on box Z Without altering the original directory. Can this be done? Thanks, Roger __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com
2006 Jan 17
14
Going nuts on ''\n'' to <br />
Hi all, Is there no way to easily resolve this. It can''t be that I''m the first that wants this, and it wouldn''t be RoR if it''s not possible. On the mysql prompt with the select description from todos .. linefeeds are show, so they are there. This is the actual contents with a linefeed after the ":" "Project contacts: delete table, point
2012 Dec 14
2
Ralink Corp RT5390 Wireless
Hey All, In looking for a solution for the subject wireless on my friend's Asus A54C laptop I found this entry: http://www.centos.org/modules/newbb/viewtopic.php?topic_id=39054&forum=55 rt2860-firmware-26-1.el6.elrepo.noarch.rpm kmod-rt5390sta-2.5.0.3-1.el6.elrepo.x86_64.rpm This solution appears to have worked for the RT3090. Would these be the right rpm's for my friend to
2006 Apr 25
4
redcloth poblems
Hi, I''m having some problems with redcloth(3.0.4 gem) and textilize. I have a string: "h2. hello _what''s up?_" which is being textilized as: <h2>hello<br /> <em>what&#8217;s up?</em></h2> so no paragraph and h2 wrapped all the way. the input is coming from firefox 1.5.2 on a mac Anybody got any idea what the problem might be? --
2006 Mar 07
6
Anybody use Red|Blue Cloth?
Does anybody use and prefer Redcloth (or bluecloth, which appears to be alpha)? Does it affect performance much? Is there a way to get it to automatically process templates without having to call textilize? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2005 Dec 24
2
Textilize on ajax update
I''m writing a basic to-do application. I''m using a form_remote_tag to submit the entry to my controller, which then returns the entry to be displayed in the table of to-do items. However, I''d like to be able to "textilize" the entry without having to reload the page. Is there any way to have my ajax function textilize the text before displaying it in the list?
2006 May 05
4
Is sanitize() strong enough to protect me from XSS?
Haven''t been able to find a good enough answer on whether using sanitize() is enough to really protect me from XSS attacks I basically have a blog page that I want to allow people to display comments on but would like to allow html tags to be posted on the comments, these could html tags like the imageshack img tags, youtube player, photobucket img tags etc any other approaches or
2008 Oct 06
2
textilize with --- (3 dashes) removes text
Hi, using --- (3 dashes) at the end of a string that is textilized, results in a single hr tag without any text. This seems weird to me. Am I overlooking something? >> av = ActionView::Base.new >> av.textilize("sometext ---") => "<hr />" Cheers, Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Mar 10
2
textilize != RedCloth.new ?
For me, textilize(stuff) produces nasty stuff - <br>''s instead of enclosing <p>''s and some closing <h*>''s are missing. RedCloth.new(stuff) works fine though. Isn''t textilize supposed to produce the same output? Or do I need to tweak something? Joe -- Posted via http://www.ruby-forum.com/.
2006 Mar 29
6
Comments for a blog
Hello, I''m making a blog and I need some function that convert the text writed for a user in a textarea into a formated text. I think to use h, but it forget paragraph breaks and I like allow some tags. By Daniel
2008 Mar 13
3
Whitespace in SuperRedCloth
Up to now, the tests have been running with whitespace stripped out. Newlines and tabs are insignificant in HTML, so I figured why bother with them? Now I realize why: they''re significant in pre tags and they also make your code look pretty! I''ve been working to get SRC output to roughly match Tetxile2''s as far as tabs and newlines go. It''s tough and
2007 Dec 05
2
some redcloth questions
1) Is there a way to strip a redcloth string of all redcloth tags? I need to display a snippet of the text in an index page and want all markings removed. I used RedCloth.new(''a'').methods but didn''t find anything appropriate. For now, I''m converting to html then stripping tags. 2) what''s the best practice in term of storing user''s redcloth-
2008 Mar 15
8
Now what?
> $ rake test > /usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/ > rake-0.7.3/lib/rake/rake_test_loader.rb" "test/test_formatters.rb" > "test/test_parser.rb" > Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/ > rake_test_loader > Started >
2006 Feb 27
12
RedCloth
Is this the prefered method to implement RedCloth in your views. I''m trying to display user input that will sometimes have code references in it. This strips out all tags. I would like for the tags to be displayed but not read as html. Thanks in advance! <%= RedCloth.new(strip_tags(comment.comment),[:filter_html]).to_html %> charlie bowman recentrambles.com -- Posted via
2006 Jan 18
1
RedCloth and lang specific hooks
Hi, I use textilize() which is a great way of letting end users edit contents. But the code in RedCloth is quite compact, and doesn''t allow for easily adding correct typographic behaviour depending on the lang of the text. For instance, correct quoting uses round double quotes in english and double carons ? ? in french; the spaces before punctuation can be corrected too. I''d
2011 Jan 13
9
spurious <li> generated when list followed by 3
RedCloth master generates a spurios <li> element when a numbered or undumbered list is followed by three or more newlines. RedCloth.new("* one\n* two\n* three \n\n\n").to_html #=> "<ul>\n\t<li>one</li>\n\t<li>two</li>\n\t<li>three</li>\n</ul>\n<li>" # note extra trailing <li> outside <ul> A colleague