similar to: strip html

Displaying 20 results from an estimated 1200 matches similar to: "strip html"

2006 Feb 19
8
uninitialized constant RailsFCGIHandler
Hello, I''m trying to switch to FastCGI. With CGI everything works, but after have done all the steps of the wiki here (http://wiki.rubyonrails.org/rails/pages/RailsOnUbuntuDebianTestingAndUnstable) My application started to give me "Error 500" Looking at the Apache logs I can see : [notice] mod_fcgid: server /rails/public/dispatch.fcgi(6127) started
2006 Feb 20
9
a complex availability problem
Ok, this is a hard one and I just thought I''d see if people on the list had any suggestions on how they would approach this, I''ve not started to implement the rails to handle this yet as I''m still at the paper planning phase. I''m building an app that has to handle availability for travel packages. The complexity comes in that a person can choose a start
2006 Feb 27
5
the best open source OS for Rails?
I''m rigging up some virtual machines in VMware to test out a new production configuration. Up till now I''ve been using Ubuntu Breezy Server distribution pre- installed on dedicated boxes by the hosting company, but in this scenario I am free to choose whatever OS I want. I''ve had some problems with Ubuntu Breezy (likes to call fastgi - fcgid etc.) and a low
2007 May 09
3
engines causing problems with mocks
As I delve further into using engines and rspec together I am noticing more strange issues. describe "Requesting /admin/collections using get" do controller_name :admin_collections before(:each) do Collection.stub!(:paginate) end it "should return a collection of collection objects" do get ''index'' response.should be_success
2006 Mar 05
9
Rails Development on a Mac Mini?
How many people out there are doing Rails development on a Mac Mini? I''ve been eyeing up the MacBook as well as the new MacMini trying to decide if I want to splurge. I''ve been doing very little Rails development thus far which makes the investment a little hard to justify. The Free Mini Mac ( http://minimacs.freepay.com/?r=16778073) offer seems like the best route but
2006 Aug 10
3
Want to use a view helper (TextHelper) in a model class
I have a model that deals with HTML and I want to use the text_helper.sanitize method to strip the HTML of Javascript. However, it doesn''t appear that I can get easy access to the text_helper methods from within a model. Anyone have any suggestions for how to do this? In general, I think that there are some ActionView helpers which are generic enough to want to use in a model class.
2006 May 30
7
Stripping HTML tags from a string
Hello, Is there a common way of stripping html tags from a string? Right now I''m just calling gsub!(/<.*?>/, ''''), but with a background in PHP and always having used its strip_tags() method, I wonder if the Rails community has standardized this fairly common task with something a bit less simpleminded than my quick fix. Thanks! Zack -------------- next part
2006 Mar 01
2
In_place_editor in a For loop
I''m using Ajax to create a list of items. Once these items have been created the user can edit in place and delete them. I''ve got the ajax working for delete and removing the element from the page, but the in_place_editor_field doesn''t seem to like being in a for loop. I''ve got in_place_editor working for single items, but what''s the syntax
2008 Jul 26
4
simple_format, (long) urls, and wrapping
I''m using simple_format to format and display posted content from users. This content sometimes has urls in it. The problem I''m having is that if the urls are long enough to wrap, they do, but the url gets split with a <br> tag. Then, if the user clicks on the link, only the first, non-wrapped part of the link gets posted to the browser... and that''s an invalid
2010 Sep 23
1
Patch to fix docs for auto_link
Hi I''ve contributed a patch which fixes an incorrect example in the documentation for auto_link in ActionView::Helpers::TextHelper. The example uses truncate in the old style of tuncate(text, length) which no longer works, so I''ve patched it to use the new tuncate(text, :length => n) style.
2006 May 15
1
Simple: How to use TextHelper in a controller
I''m having trouble succesfully getting access to the ActionView::Helpers::TextHelper.strip_tags method from one of my controllers. If I try to call it directly using ActionView::Helpers::TextHelper.strip_tags I get undefined method `strip_tags'' for ActionView::Helpers::TextHelper:Module What is the preferred way to make ActionView helpers available to a descendant of
2007 Nov 29
27
Strip & Sanitize BEFORE saving data
So I''ve googled my brains out, and I see a lot of talk about TextHelper for views, but next to no discussion about cleaning text _before_ it is saved. I figured this had to be asked 4 zillion times, but I''m not finding anything concrete/obvious. Using h is fine as a safety catch, but that alone is not acceptable to me as the means of diffusing the impact of HTML or JS
2006 Jun 04
5
Embedding link_to''s within text fetched from database.
Hi, I have the following problem that I can''t seem to figure out. I want to able to fetch some text from my database record in my controller, and then add two links within the text and then send that back to the view to get rendered so that the two links appear as links and when clicked on, they''d basically call the corresponding action for the link. Would anybody know how to
2006 Feb 10
4
RegEx Question
Hi, This is more of a Ruby question than Rails. I want to autolink url''s in a given string. I''m not great with regular expressions and I wandered if anybody has an example. Thanks.
2006 Aug 10
7
Mongrel proxied through Apache won''t serve images
I followed the tutorial from Coda Hale[1] on setting up Mongrel/Mongrel_cluster and Apache to move away from my current Apache+FastCGI setup. The mongrels are all working fine, and Apache is proxying all dynamic requests through to the cluster using proxy balance. Strange thing is now, that all my images in public/images aren''t loading at all, if I access them directly I just get a
2007 Jun 24
6
mocking errors
What is the correct way to mock out the errors on a Rails model? I''m assuming i need to say @mock_thing = mock_model(Thing) @mock_thing_errors = mock("errors") @mock_thing_errors.should_receive(:full_messages).and_return("An error") @mock_thing.should_receive(:errors).and_return(@mock_thing_errors) Just wanted to check the best practice on this kind of thing and how
2007 Jun 25
5
strange mock error
I''m testing using the rspec mocking framework and rspec 1.0.5 and I''m getting the following strange error: #<Spec::Mocks::Mock:0x337f7c8> expected :set_defaults with (#<Service: 0x19c4040 @name="Service_1023">, {"1"=>"1", "2"=>"2"}) but received it with (#<Service:0x19c4040
2006 Mar 30
2
How do I format text before saving it?
I tried to use a before_save and use simple_format, it returns and undefined method error. Can I even use these methods within a model? I tried to use auto_link and it failed too. What am I doing wrong? Furthermore, would it be recommended I format text before saving it to the database? Advantages or disadvantages? -- Posted via http://www.ruby-forum.com/.
2007 Mar 27
3
Stubbing out method for all instances
I am using the acts_as_state_machine plugin to control state of an object in my app, however when testing this I need to be able to stub out the guard conditions so that state will change when I fire off an event without depending on other models. Guard conditions simply return true or false so I have an instance method: def encoded? <check state of other objects> return true
2016 Mar 24
2
C5 MySQL injection attack ("Union Select")
On Thu, 2016-03-24 at 14:27 +0300, ????????? ???????? wrote: > This is obviously an application level problem. What is this php file? > You should upgrade wordpress and remove or block access to the plugin or > custom page which allows sql injections. Yes, my mistake. I should have imposed strict controls on the length of parameters passed to programmes via web pages $_GET[] such as:-