similar to: Tiny patch (7641) for broken HTML::Document parsing

Displaying 20 results from an estimated 20000 matches similar to: "Tiny patch (7641) for broken HTML::Document parsing"

2008 Mar 04
4
ActionView 2.0.2 broken without ActionController
Hello all, You can easily reproduce with Rails 2.0.2 gems: $ irb >> require ''rubygems'' >> require ''active_support'' >> require ''action_pack'' >> require ''action_view'' *BOOM* You should get an error: MissingSourceFile: no such file to load -- html/document This is because
2006 Mar 06
2
form_tag error -- not found, 404 -- action DOES exist!
Hi -- I''ve got a very strange error. I have an action called ''commit_input'' on a controller called ''SiteVisitController''. This definately exists, and is called from the functional test for it, and passes fine. My problem is with the form that is supposed to call this action. The form tag is: <%=
2006 Aug 03
0
problem with Rails: cgi.rb:342
here is the error i am getting while trying to do functional / integration tests. can someone tell me if this error has been fixed, and if so, how do i get the fix ? i am currently running 1.8.4 of ruby Loaded suite test/integration/stories_test NoMethodError (private method `gsub'' called for 0:Fixnum): c:/ruby/lib/ruby/1.8/cgi.rb:342:in `escape''
2013 Jun 06
0
Using Loofah to gain control of what HTML tags get sanitized
Hi everyone I''m Kasper. One part of<http://weblog.rubyonrails.org/2013/5/27/rails-google-summer-of-code-projects/> the Rails Google Summer of Code participants. This means I will replace the venerable html-scanner with Loofah, picking up where this issue left off: https://github.com/rails/rails/issues/2550. Rafael França was assigned to that issue and he is my mentor during the
2008 Mar 07
0
Extended Mime Responder functionality
Using custom mime types, I''ve run into instances where I end up calling the same function over and over again for a specific type. After a little tweaking I came up with a monkey patch that allows to pass a default block at mimetype registration time, and allows responder block calls to take arguments. I uploaded the monkey patch so let me know your thoughts. It currently only works for
2006 Jun 05
6
HTML Parsing libraries
Hi, What is the best way to parse HTML? Or is there a simple way to convert a table to an array? I tried beautiful_soup and the built-in htmltools, but have trouble getting them to run. Any pointers? Thanks, Hari -- Posted via http://www.ruby-forum.com/.
2013 Feb 10
0
Nested attributes doesnt get updated
Hi Am building a nested form and my code works fine with sqlite3 but throws errors when using Oracle during update action. Am getting the following error: ActiveRecord::RecordNotFound in AWRequestsController#update Couldn''t find WADetail with ID=5000000015 for AWRequest with ID=5000000022.0 Request *Parameters*: {"utf8"=>"✓",
2007 Sep 07
4
Ferret DRB - can add/edit index, but can''t search
I''m trying to use the Ferret DRB server to avoid concurrency issues when using multiple mongrels. I can successfully add and edit data on my index via the DRB server, however, when I search the index, I get the following error: DRb::DRbConnError (DRb::DRbServerNotFound): /usr/lib/ruby/1.8/drb/drb.rb:1647:in `current_server'' /usr/lib/ruby/1.8/drb/drb.rb:1709:in
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all n = Nokogiri::HTML("<h1>H1</h1>") n.to_s # => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html> Is there a method that only outputs the stuff I''ve read, and not the whole valid XHTML stuff?
2006 Aug 04
8
Unable to follow basic RoR tutorial (Win32)
I have just set up RoR to find out for myself if this tool is stable enough to actually be used yet. Anyhow, I started by going to the RubyOnRails website and following the instructions to install the platform on my Windows 2000 PC. "Get Ruby on Rails in no time" "We recommend Ruby 1.8.4 for use with Rails." So... I downloaded 1.8.4 and installed: C:\>ruby -v ruby
2010 Jun 24
0
Rails3: render_to_string of a .html.erb when request is a json request raises MissingTemplate error
I''ve the following situation (which actually works in Rails 2.3.8 and this is a result of the migration of our app to rails3): I have a partial which is rendered a few times (imagine tr''s in a table). On the clientside there''s a script that does a json request for a specific row (jQuery + ajax dataType: ''json'' and type: ''POST'') In
2006 Jul 04
1
Smart html output for an object?
Hi, I''m trying to make it so that an object can be easily printed into the html format I want. I''ve been focusing on using a case/when control structure, so let me start by showing you some code... I was trying to use this following code as a helper method, def print_question(question) @question = question case @question.question_type.code when
2006 Mar 14
1
html-scanner in controller?
Rails'' docs state for strip_tags: "Strips all HTML tags from the input, including comments. This uses the html-scanner tokenizer and so it?s HTML parsing ability is limited by that of html-scanner.Returns the tag free text." What''s "html-scanner" (some brief Googling didn''t find anything definitive) and can I use it in a controller? Joe --
2006 Jan 19
3
Why does Object.subclasses_of ignore subclasses within modules?
ActiveSupport provides a method Object.subclasses_of, shown below: def subclasses_of(*superclasses) subclasses = [] ObjectSpace.each_object(Class) do |k| next if (k.ancestors & superclasses).empty? || superclasses.include?(k) || k.to_s.include?("::") || subclasses.include?(k) subclasses << k end subclasses end Can anyone shine some light on why
2011 Mar 29
0
Issue / code smell in AssociationProxy
I came across an issue in my code and after a hard debug session I found something that smells. First the context of my issue. I have a AR object that has a polymorphic belongs_to currently tied to nothing, I want to dump it to YAML. record.to_yaml This raises the following exception: TypeError: wrong argument type nil (expected Data) from
2007 Mar 12
1
Can't follow redirects outside current controller - but it's the same controller
Running a functional test on FooController that does ''follow_redirect'', I get ''Can''t follow redirects outside current controller (from "foo" to "foo"). On further investigation, it turns out that :foo != ''foo'' around line 401 of actionpack/lib/ action_controller/test_process.rb. Changing the line: if redirected_controller
2006 Feb 28
0
help with sanitizing html (comments in blog)
I''ve added this method in my model which is called with each save. It does a good job getting rid of html tags and then emplementing RedCloth. I''m very new at blogs so I''m not sure if this is adequate or not for comments. What do you think? I would love to hear if this is safe, unsafe, or just plain bad form. Also, I don''t think that RedCloth is
2011 Jul 07
0
Rails3 Mailer html / text versions order
I am sending the emails as per the documentation order : html / text but users are receiving the text version first and not the html ( need to switch to an alternative version ..) I guess I missed a point but which one ? thanks for your help RAILS DOC ======== class UserMailer < ActionMailer::Base default :from => "notifications-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org"
2008 Mar 12
3
a way to restrict who can install your app, for private testing
This is something I just cooked up to allow me to restrict temporarily who can access my app, based on an array of UIDs. It''s messy but works. Put at the top of your controller, at the end of your filters. # This filter is only until we open everything up before_filter do |c| acceptable_uids = [''594180515'', ''122612996''] unless
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do: