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

search encoding bug #586

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

Comments

Projects
None yet
4 participants
@huglester

huglester commented Jun 3, 2015

Hello,

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

cheers

@d0ugal

This comment has been minimized.

Member

d0ugal commented Jun 3, 2015

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

@ProfYaffle

This comment has been minimized.

Contributor

ProfYaffle commented Jun 3, 2015

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

This comment has been minimized.

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 added a commit to samhatfield/mkdocs that referenced this issue Jun 4, 2015

@samhatfield

This comment has been minimized.

Contributor

samhatfield commented Jun 4, 2015

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

This comment has been minimized.

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