similar to: Stripping HTML tags from a string

Displaying 20 results from an estimated 1000 matches similar to: "Stripping HTML tags from a string"

2006 May 30
11
Another String Manipulation Exercise
Hi guys, And I thought it wasn''t a problem. Here''s my string "/var/www/vhosts/mysite.com/httpdocs/public/file/mypic.jpg" How do i take out all the text that comes before "mypic.jpg"? Trickier than I first thought. TIA, Bing -- Posted via http://www.ruby-forum.com/.
2006 Jul 26
3
newbie: Scaffold doesn''t pickup DB changes
I''m following along with the depot example in ''Agile Web Development'' and ran into a problem with Scaffold. I changed the MySQL table structure to add a few columns directly and also tried the migrate script to change the database after I got the initial scaffolding to work. However, I can''t seem to get the new columns to show up and am stumped as to how I can
2006 Jan 27
10
html special characters. h() failure.
I was trying to convert a some text with the (r) character it so it replaced character \xAE with ® h(@item.description) didn''t do anything. I need to use @item.description.grep(/\xAE/,''®'') for it to work. I think the h() function should be able to do all the codes that are available. Regards Neil.
2006 Mar 14
8
email address parse
hi all how to parse such email string to a array: #-------------------------------------------- "joe black"<joe_1@joe_black.com> joe_2@joe_black.com, joe_3@joe_black.com #-------------------------------------------- seems emails from user input include various format. and i have to split them to a array. any idea? regards. -- Posted via http://www.ruby-forum.com/.
2006 May 19
12
How to build a server
Hi, I''ve been learning about building Rails apps for about 8 months but I don''t really know how servers work or how to build a server. I have an old 450 GHz Pentium computer I can play with. Since I use OS X, I was thinking about installing a BSD system and trying to make a MySQL/Rails server. That is about all I know about servers. How does a server in my house get connected
2006 Jun 01
3
New rails site: AJAX Webbrowser
Heres my Ruby on Rails webbrowser: https://palary.org Sorry, but I just couldn''t resist. Cheers, Scott
2006 Jan 13
1
h() aka. html_escape in controller code?
Hi. In controller code I''m doing things like: flash[:success] = "Customer {#@customer.name} has been deleted." I know how to escape html in views by using the h() method. How can I do the same thing here in the controller? Thanks, Zack
2006 Jul 10
2
backups/version controll/source controll
Hi, i was wondering if there was some kind of program i could download to keep track of my rails applications; something in the vicinity of subversion (a open-source backing-up tracking program - i.e to keep track of my applications once they are on the net, during a q&a period, where i''d be changing my application periodicly, but keeping a current version on the net, and one
2007 Jan 12
5
Regression lines
My simpleminded understanding of simple regression is that when plotting regression lines for x on y and y on x in the same plot, the lines should cross each other at the respective means. But, given the R function below, abline (lm(y~x)) works fine, but abline (lm(x~y)) does not. Why? function () { attach (attitude) x <- rating y <- learning detach (attitude) plot (x, y)
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
2006 Jan 18
7
Inspect
I am seeing a curious anomaly with the inspect method. It displays one of the objects in a way I don''t understand. I''ll use the Recipes example to illustrate. First, I''ll describe the recipes table, then show how the @recipe variable is being created in the controller and passed in to the show view, and then show how I''m using the
2006 Aug 09
21
DHH''s Post on Ruby Talk -- Rails 1.1.5: Mandatory security patch (and other tidbits)
We''re still hard at work on Rails 1.2, which features all the new dandy REST stuff and more, but a serious security concern has come to our attention that needed to be addressed sooner than the release of 1.2 would allow. So here''s Rails 1.1.5! This is a MANDATORY upgrade for anyone not running on a very recent edge (which isn''t affected by this). If you have a public
2006 May 20
10
HOW TO create a new record and its associated objects within the SAME PAGE
hi, can''t find any good tutorial or advice to deal with the creation of a new record and it''s associated objects within the same page. do i have to use ajax just to add custom form fields that will be handled by the controller for associated objects creation.? do i have to use ajax to add associated objects to the unsaved but allready in session parent object? what''s
2006 Sep 07
5
url_for always escape string.
according to the documentation, only the url_for from ActionView escape the URL. which happens on this line escape ? html_escape(url) : url and can be prevented by passing :escape => false to url_for. still according to the documentation, the url_for from ActionController is not supposed to escape the url. BUT IT DOES. at the moment of this line escape ? html_escape(url) : url url has
2006 Mar 14
7
Single form w/ relationships: how do I integrate it?
OK - I know this has been asked before, but I cannot find it in the archives. Forgive me if I''m creating more noise than I should. I want to know the easiest way to deal with this scenario: I have articles. I have categories for the articles. On the form where you write an article, there needs to be a free-form field to entire the category. The create() method will build the
2011 Feb 09
16
rails 3.0.4 broke yield :javascript ?
hello, I have today updated my rails app to 3.0.4 security release but now this yield :javascripts fails in the layout and I get my custom js escaped as text in the view. anybody seeing this also? tia, jk -- www.least-significant-bit.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to
2006 Jan 22
9
ERROR: undefined method `h'' for ERB::Util:Module
ERROR: undefined method `h'' for ERB::Util:Module i get above error when i use ERB::Util.h(content) in my controller''s action. can any one one tell me how to use this ''h'' method within controller? thanks, Jigar Gosar http://jigar.org -- Posted via http://www.ruby-forum.com/.
2006 Jan 18
4
Ruby "htmlentities" replacement: code review please!
Hi Railers, For some time now I''ve been looking for a decent Rails equivalent of PHP''s "htmlentities" command, because ERB''s html_escape (or more commonly called as just "h", eg. <%=h @somevariable %> ) just doesn''t go far enough for me. Back in PHP land, I actually had an extended version of the htmlentities command to deal with
2006 May 16
4
Problems with multiple ''id'' columns in a join_table
I have a problem declaring a relationship through a join_table ; the SQL generated by ActiveRecord is correct, but there are two columns called ''id'', and the final object gets the ''wrong'' column ... Here''s a more detailed description of the data, code, and problem :- There''s a People table, with id, name, and a few things. Also a
2005 Dec 29
3
What does ''h'' do?
I''m sure a real newbie question, but try searching for ''h'' in any search engine and you don''t get far. I am wondering what the h does in Ruby as in the code below: <%= h(truncate(product.description, 80)) %> -- Posted via http://www.ruby-forum.com/.