inotwell cumpiuter &and lunguish engilish thanks

On Sat, Dec 19, 2009 at 10:31 AM, AlwaysCharging <goodg...@gmail.com> wrote:

> In my app, I allow users to submit urls.  They (of course) need the
> ability to submit urls with a forward slash, "/", but whats the
> regular expression to allow them to do that?
>
> I currently use:
>
> validates_format_of :url, :with => /^[-\w\_.]+$/i
>
> to only allow alphanumerics, dashes, underscores, and dots to prevent
> cross site scripting when I later reconstruct these urls, but I can't
> figure out how to allow "/" as well.
>
> Any ideas?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to