Merge pull request #309 from a2nt/multibyte_url_convertion

IMPROVEMENT Convert multibyte URLs preview to human readable format
This commit is contained in:
Ingo Schommer 2013-04-02 02:31:07 -07:00
commit 4d3e19958e

View File

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