mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge pull request #309 from a2nt/multibyte_url_convertion
IMPROVEMENT Convert multibyte URLs preview to human readable format
This commit is contained in:
commit
4d3e19958e
@ -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);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user