开发者

Rails encoding url params from a helper method

开发者 https://www.devze.com 2023-02-08 04:52 出处:网络
When I generate a url in a Rails helper it converts the querystring params from this:开发者_Go百科

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

精彩评论

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