diff --git a/src/en/examples/vector/download.js b/src/en/examples/vector/download.js index f51661fb..b36809e7 100644 --- a/src/en/examples/vector/download.js +++ b/src/en/examples/vector/download.js @@ -63,6 +63,7 @@ const download = document.getElementById('download'); source.on('change', function () { const features = source.getFeatures(); const json = format.writeFeatures(features); - download.href = 'data:text/json;charset=utf-8,' + json; + download.href = + 'data:application/json;charset=utf-8,' + encodeURIComponent(json); }); //! [download]