diff --git a/templates/base/components/input/file-select/layout.js.twig b/templates/base/components/input/file-select/layout.js.twig index 1171bf679d..bfc223b2b6 100644 --- a/templates/base/components/input/file-select/layout.js.twig +++ b/templates/base/components/input/file-select/layout.js.twig @@ -3,6 +3,7 @@ {% if oUIBlock.GetShowFilename() %} $('#{{ oUIBlock.GetId() }}').bind('change', function() { var fileName = $(this).val().replace(/^.*[\\\/]/, ''); + fileName = $('
').text(fileName).html(); $('#{{ oUIBlock.GetId() }}-file-name').html(fileName); }); {% endif %} \ No newline at end of file