How to unescape in query_string double semicolons?

前端 未结 1 1056
攒了一身酷
攒了一身酷 2021-01-28 19:46

I have following request:

/posts?from=45&q=mad;;depot&size=15

But controller params is:

{\"from\"=>\"45\",
 \"q\"=&g         


        
相关标签:
1条回答
  • 2021-01-28 20:26

    I think you will have to encode your params first to

    /posts?from=45&q=mad%3B%3Bdepot&size=15
    

    Then Rails will recognize it correctly.

    For more information about encode URL: http://www.w3schools.com/tags/ref_urlencode.asp

    0 讨论(0)
提交回复
热议问题