search for: filter_html

Displaying 15 results from an estimated 15 matches for "filter_html".

2006 Sep 18
2
RedCloth !image! bug with filter_html
Hi all! I am trying tu set up RedCloth for user-submitted comments. And here is my problem. The :filter_html option just breaks images :-( For example, if I try in irb: string= "Some textile !agif.gif! and textile again" RedCloth.new(string, [:filter_html, :filter_styles]).to_html(:textile) I get: NoMethodError: You have a nil object when you didn''t expect it! The error occured whil...
2006 May 27
0
:filter_html and :hard_breaks makes <br> ...weird
hi! never posted to a mailing list before so I hope this is an appropriate use. Love redcloth btw! I guess I just have a bug report though... if I turn on hard_breaks and filter_html, all the <br />s turn into <br>s. weird. For now I''m just doing this which is fine: textilized = RedCloth.new(text, [ :filter_html, :hard_breaks ]) return textilized.to_html.gsub(/<br>/, ''<br />'') But I thought Id let anyone know who was intere...
2006 Jul 05
0
RedCloth Error with :filter_html and external images links
Hi all, I''m trying to use RedCloth to filter HTML out of some user generated content using the :filter_html setting and I get the same error as reported in the link below. http://rubyforge.org/tracker/index.php?func=detail&aid=3262&group_id=216&atid=891 Has anyone found a workaround for this? -- Thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: h...
2007 Aug 29
0
Patch - bug fix for RedCloth when using !image! and :filter_html in combination
RedCloth.new("!image!", [:filter_html]).to_html will cause the following error: "error occurred while evaluating nil.gsub" This patch will fix it. Can you apply this please to next release of RedCloth? Thanks! Tim --- redcloth_old.rb 2007-08-29 17:02:51.537099600 -0600 +++ redcloth.rb 2007-08-29 17...
2007 Dec 04
2
Bug: NoMethodError: private method `gsub'' called for nil:NilClass
Hi there. I''m using RedCloth as part of a social network''s blog system. I came across the following bug when an img tag with the src attribute is inputted, and filter_html is set to true. I have pasted the code sample below. >> require ''RubyGems'' => true >> require ''RedCloth'' => true >> RedCloth.new(''<img src="">'',[:filter_html]).to_html NoMethodError: private method `g...
2007 Jan 28
1
^SUPER^ _RED_ ~CLOTH~ 1.153
...whytheluckystiff.net Use it like: SuperRedCloth.new("_huh?_").to_html Okay, getting close! A lot more tests are passing. There are still about 50 tests failing. Most of these are due to ol/ul list problems. Here''s what''s still broken: * Options (:hard_breaks, :filter_html, etc.) * Lists (specifically: grouping list items into a single list) * <notextile>...</notextile> (I need to take a different approach.) * No markdown tags (Still thinking about this.) Seriously. That''s all that''s left. A good number of failing tests just need t...
2006 Aug 04
0
Hard break broken in 3.0.4?
...tiki installation went nuts when a sysadmin upgraded from Rails 1.1.0 to 1.1.4. But surely RedCloth has no dependencies upon Rails, so it is presumably a concurrent upgrade of the RedCloth gem (from what is, I''m afraid, an unknown earlier version) that has introduced the problem. BTW, filter_html might be broken too - this doesn''t look like what I''d expect it to do at all: irb(main):002:0> rc = RedCloth.new("Escape<br>This <stuff>.") => "Escape<br>This <stuff>." irb(main):003:0> rc.to_html(:textile) => &...
2005 May 24
3
textilize/markdown/sanitize for messageboards, oh my!
...rspective). On the other hand, BlueCloth doesn''t seem to give me a lot of control over how much it actually converts and escapes, which can be an issue. An example: I''m perfectly okay with *not* allowing my users to use any straight HTML tags whatsoever. So off I go and pass the :filter_html option to BlueCloth, which works great *except* now BlueCloth escapes HTML inside code blocks (blocks indented by 4 spaces) twice, which is not what it should be doing, I believe. To cut a long story, er, short, I don''t feel like I''m on the right path here (considering some other...
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on this. I''ve nearly got my plugin finished but I can''t seem to get this to work. The method is in ActionController::Base but it is protected. -- Posted via http://www.ruby-forum.com/.
2006 Feb 27
12
RedCloth
...ethod 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 http://www.ruby-forum.com/.
2006 May 31
0
acts_as_blog
...longs_to :post before_save :transform_comment ## validation checks validates_presence_of :name, :raw_comment ## we filter out all html tags except those created by the markup def transform_comment self.comment = Comment.convert_to_html(self.raw_comment,''textile'',[:filter_html]) end ===================================================================== The available markup style are markdown,textile,smartypants. To run the method, you just need to pass the raw text,markup style, and then any filters you need to use. It will return the valid html from your raw text. Ju...
2006 Feb 28
0
help with sanitizing html (comments in blog)
...suggestions are welcome and appreciated! def transform_comment self.comment = self.comment.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;") self.comment = RedCloth.new(self.comment,[:filter_html]).to_html end Charlie Bowman -- Posted via http://www.ruby-forum.com/.
2010 Apr 13
1
BBCode Fork of RedCloth
how do you install this? especially on rails 3? putting gem "redcloth", :git => "git://github.com/ROFISH/redcloth.git" doesn''t work. and do nested tags like [quote][quote][/quote][/quote] work? -- Posted via http://www.ruby-forum.com/.
2007 Jan 23
7
RedCloth and SuperRedCloth
Good day to the parliament of RedCloth followers gathered here. Grave matters at hand!! I''m personally quite unhappy with the state of RedCloth and am reluctant to release the code in the repository. I can''t say if the code works with any confidence because I can''t generate the (Poignant) Guide with the current RedCloth. I know some things are fixed, but I''m
2007 Jul 16
6
Advice regarding extending RedCloth
Hello, I am in a bit of a bind. I need to reliably parse mediawiki markup to html, and the only parser that I can find (mediacloth) has a lot to be desired, so I would like to extend something that works and parse mediawiki markup. My question to this list is should I start working on RedCloth or SuperRedCloth or is there a difference as far as extending them? Also does anyone know of a write up