[symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread nidkil
No one willing to help a newbie? On 22 nov, 20:39, nidkil stephen.oostenbr...@gmail.com wrote: Hi, I'm new to Symfony and busy playing around with the Jobeet tutorial. I'm up to the chapter 5 Routing and playing around with the for_url statement. I am getting a plus (+) as a replacement for

[symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread rooster (Russ)
Probably the easiest way to solve this would be to ensure your urls don't contain spaces in the first place. If you are generating urls based on user generated input (user name, article name etc) then look into creating slugs for this purpose. I'm pretty sure the symfony routing simply makes use

Re: [symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread Gareth McCumskey
str_replace(+, _, url_for(path/to/url)); Don't need symfony for everything ;) On Mon, Nov 23, 2009 at 5:44 PM, nidkil stephen.oostenbr...@gmail.comwrote: No one willing to help a newbie? On 22 nov, 20:39, nidkil stephen.oostenbr...@gmail.com wrote: Hi, I'm new to Symfony and busy

[symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread nidkil
Hi Gareth Russ, Thx for your responses guys! My question was actually triggered by the excersise in jobeet. In the tutorial it shows spaces of the generated url replaced by hypens (-). In my local installation the spaces in the url are replaced by plusses (+). That's what made me wonder if this

Re: [symfony-users] Re: Changing the character used to replace spaces in url_for

2009-11-23 Thread Alexandre SALOME
Spaces are encoded as + in URL style (HTTP definition). Giving some text without filtering could give you some bad URLs. What about characters : é, à, ç, %, * Maybe you should add a slug column to your schema, to get a-friendly-url-text and use it. Hard replacing the spaces using