IMPROVEMENT Convert multibyte URLs preview to human redable format

This commit is contained in:
a2nt 2013-04-03 06:35:42 +07:00
parent fbfc939fc4
commit 73e97e7c42

View File

@ -24,7 +24,7 @@
redraw: function() {
var field = this.find(':text'),
url = field.data('prefix') + field.val(),
url = decodeURI(field.data('prefix') + field.val()),
previewUrl = url;
// Truncate URL if required (ignoring the suffix, retaining the full value)
@ -33,7 +33,7 @@
}
// Transfer current value to holder
this.find('.preview').attr('href', url + field.data('suffix')).text(previewUrl);
this.find('.preview').attr('href', encodeURI(url + field.data('suffix'))).text(previewUrl);
},
/**