Transliteration of the names of the tags and slug?

When you add tags to the post in the opening box to choose existing or make new. Gaining a few characters and the script shows the appropriate already existing in the DB tags. The problem is that this only works correctly with the Latin alphabet, adding Cyrillic characters they are displayed as: %D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82 - instead of "Hello", for example... In the same kind made to the database.

I suspect the problem is in the code:
$(document).ready(function()
{
markdown();

 $('form').areYouSure({ 'message': '{$lang.general.unsaved_warning}' });

 var $tags = $('select[name="tags[]"]');

if($tags.hasClass('selectator'))
$tags.selectator('destroy');

$tags.selectator({
 height: '39px',
 useSearch: true,
 useOnMobile: true,
 showAllOptionsOnFocus: true,
 load: function (search, callback) {
 if (search.length < this.minSearchLength) return callback();
$.ajax({
 url: '{?= url (["ADMIN", "blog", "jsontags", "' + encodeURIComponent(search) + '"]) ?}',
 type: 'GET',
 dataType: 'json',
 success: function(data) {
 callback(data.slice(0, 10));
},
 error: function() {
callback();
}
});
},
 placeholder: '{$lang.blog.add_a_tag}...',
 delay: 200,
 minSearchLength: 2,
 valueField: 'name',
 textField: 'name',
 render: {
 option: function (_item, escape) {
 var html = ";
 html += '<div class="selectator_option_title">';
 html += ((typeof _item.name !== 'undefined') ? _item.name.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/g, ") : ");
 html += '</div>';
 return html;
}
}
 });

encodeURIComponent and all that... But find a mistake and rewrite can't. Help if given enough information.
June 14th 19 at 20:55
1 answer
June 14th 19 at 20:57
on the server side raskhodimosti content using rawurldecode

Find more questions by tags JavaScriptPHP