From 73e97e7c4267367f273ffd5eb5a7c81843c9f164 Mon Sep 17 00:00:00 2001 From: a2nt Date: Wed, 3 Apr 2013 06:35:42 +0700 Subject: [PATCH] IMPROVEMENT Convert multibyte URLs preview to human redable format --- javascript/SiteTreeURLSegmentField.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/SiteTreeURLSegmentField.js b/javascript/SiteTreeURLSegmentField.js index 450612cb..4b671178 100644 --- a/javascript/SiteTreeURLSegmentField.js +++ b/javascript/SiteTreeURLSegmentField.js @@ -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); }, /**