Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Routing - Passing a value with ampersand &
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ashok.b  
View profile  
 More options Nov 9, 7:56 pm
From: "ashok.b" <email2...@gmail.com>
Date: Mon, 9 Nov 2009 16:56:07 -0800 (PST)
Local: Mon, Nov 9 2009 7:56 pm
Subject: Routing - Passing a value with ampersand &
Hi, I'm trying to pass values having an ampersand... like
http://localhost/cake/cat/TV & Music where "TV & Music" is the
category name and the /cat is actually passed to /Categories/display/
TV & Music.

I added the following in routes.php to achieve the above:
        Router::connect('/cat/*', array('controller' => 'Categories',
'action' => 'display'));

For all category names without &, this works fine. But categories
having & fails. In the above example, query happens only for "TV" and
not for "TV & Music". Can some one help me with this?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Weldon  
View profile  
 More options Nov 9, 8:30 pm
From: Graham Weldon <gra...@grahamweldon.com>
Date: Tue, 10 Nov 2009 12:30:07 +1100
Local: Mon, Nov 9 2009 8:30 pm
Subject: Re: Routing - Passing a value with ampersand &
You might need to do:

1) URL encode your category names
Or
2) refactor to allow category name slugs for URL access to avoid use  
of special characters

Cheers
Graham

On 10/11/2009, at 11:56 AM, "ashok.b" <email2...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ashok.b  
View profile  
 More options Nov 10, 1:32 am
From: "ashok.b" <email2...@gmail.com>
Date: Mon, 9 Nov 2009 22:32:06 -0800 (PST)
Local: Tues, Nov 10 2009 1:32 am
Subject: Re: Routing - Passing a value with ampersand &
Thanks for the reply Graham, I'm actually a newbie to cakephp, can you
kindly give some guidance code to how to do either 1 or 2?

On Nov 10, 6:30 am, Graham Weldon <gra...@grahamweldon.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ashok.b  
View profile  
 More options Nov 12, 11:14 am
From: "ashok.b" <email2...@gmail.com>
Date: Thu, 12 Nov 2009 08:14:14 -0800 (PST)
Local: Thurs, Nov 12 2009 11:14 am
Subject: Re: Routing - Passing a value with ampersand &
bump

On Nov 10, 11:32 am, "ashok.b" <email2...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Dahl  
View profile  
 More options Nov 12, 12:25 pm
From: Scott Dahl <scottmd...@gmail.com>
Date: Thu, 12 Nov 2009 09:25:17 -0800
Local: Thurs, Nov 12 2009 12:25 pm
Subject: Re: Routing - Passing a value with ampersand &

try using the php functions urlencode and urldecode


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google