M
M
Mikhail2019-08-28 02:09:54
Yii
Mikhail, 2019-08-28 02:09:54

How to configure dmirogin/yii2-js-urlmanager to work with Cyrillic?

I dealt with the issue of Url formation ( my previous question ) and successfully figured out what I wrote in detail there, but I ran into another problem, apparently the dmirogin/yii2-js-urlmanager extension does not work with Cyrillic, and as soon as Cyrillic enters the request field, routes stop working.

UrlManager.createUrl('main/search', {request: 'йцу'});

And instead of beautiful url
http://test.com/search/123
or
http://test.com/search/qwe
gives out
http://test.com/main/search?request=йцу.
My route rule is
'search/<request:\w+>' => 'main/search',
main-controller
search-action
The regular expression w+ works correctly with Cyrillic on other actions, from here I concluded that the problem is in the extension, if not, correct me or help correct the extension.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2019-08-28
@usdglander

Well, in theory , you need to add the u modifier here . And how to do it - see for yourself. :) Either write a new UrlRule, or fork the component and make your changes to it, or create a pull request to this repository and wait for it to be accepted, then update.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question