Skip to content

search encoding bug #586

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

Closed
huglester opened this issue Jun 3, 2015 · 5 comments
Closed

search encoding bug #586

huglester opened this issue Jun 3, 2015 · 5 comments
Labels
Milestone

Comments

@huglester
Copy link

Hello,

for example you search for:
some fonts
it becomes
some+fonts
when you press enter again, it becomes
some%2Bfonts

cheers

@d0ugal
Copy link
Member

d0ugal commented Jun 3, 2015

Ah, that it annoying. I guess this happens on the ReadTheDocs theme?

@ProfYaffle
Copy link
Contributor

Confirmed here with the RTD theme. The space gets converted to "+", and then to %2B (so still "+"), and then each successive 'enter' adds a %25 ("%"?) - so:

some text
some+text
some%2Btext
some%252Btext
some%25252Btext
...

System, FWIW:

wibble:~$ mkdocs --version
mkdocs, version 0.13.3
wibble:~$ python --version
Python 2.7.6
wibble:~$ uname -a
Linux Romulus 3.13.0-53-generic #89-Ubuntu SMP Wed May 20 10:34:39 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

@d0ugal d0ugal added the Bug label Jun 3, 2015
@d0ugal d0ugal added this to the 0.14.0 milestone Jun 3, 2015
@d0ugal
Copy link
Member

d0ugal commented Jun 3, 2015

Thanks, good catch. I can see how that would happen. I'll look into a fix if nobody else does it first :)

samhatfield pushed a commit to samhatfield/mkdocs that referenced this issue Jun 4, 2015
@samhatfield
Copy link
Contributor

I think I fixed it... See my commit. I gather the plus replacement is necessary because GET forms encode their data with a different encoding specification to JavaScript's decodeURIComponent?

@d0ugal
Copy link
Member

d0ugal commented Jun 4, 2015

@samhatfield Yup, that makes sense. Looks good, can you open a pull request?

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

No branches or pull requests

4 participants