Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils 里面的 param2Obj 似乎无法处理带空格的param值 #1711

Closed
OtaconBYF opened this issue Mar 14, 2019 · 4 comments · Fixed by #1712
Closed

utils 里面的 param2Obj 似乎无法处理带空格的param值 #1711

OtaconBYF opened this issue Mar 14, 2019 · 4 comments · Fixed by #1712
Labels

Comments

@OtaconBYF
Copy link
Contributor

utils 里面的 param2Obj 似乎无法处理带空格的param值,会把空格变加号。
加了一行 .replace(/+/g, ' ') 解决
请问这个是bug还是feature >.<

@PanJiaChen
Copy link
Owner

有test case 例子么

@OtaconBYF
Copy link
Contributor Author

OtaconBYF commented Mar 14, 2019

https://jsfiddle.net/71tvs4op/6/

前提是空格是encode成加号的情况,https://stackoverflow.com/questions/2678551/when-to-encode-space-to-plus-or-20

这种情况发生的时候:我把列表栏位排序传的 +id 改为了 id ASC

@PanJiaChen
Copy link
Owner

我看了,的确没处理这种情况。

欢迎提pr。

@OtaconBYF
Copy link
Contributor Author

十分感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants