It's working now. I wasn't supposed to have the time, but that was a very small change so what the heck. Btw I don't really understand the difference between your two propositions in your first post
PS: the implementation doesn't work from the url, only from the search box (javascript side).
The two options above are not very different anyway. It doesn't make much difference. Either one would have been fine. The first option was for non-kanji first characters like a space or ご飯.