开发者

Rails encoding url params from a helper method

When I generate a url in a Rails helper it converts the querystring params from this:开发者_Go百科

?id=2&asdfsadf=2234324

into:

?id=2&asdfsadf=2234324

I'm using this url to link to an image. Is this url still valid even though the ampersands have been replaced?


Yes -- it's valid HTML. Your browser will decode the & into &. (It's not valid for pasting into the address bar. Well, technically it is valid, but it won't do what you expect.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜