From f06d33df55b32d5fb90a72c9635623c9b9ee64f8 Mon Sep 17 00:00:00 2001 From: David Chanin Date: Sat, 22 Jun 2019 23:30:52 +0100 Subject: [PATCH] fix: adding explicit encodeUriComponent to hopefully help iOS load chars properly --- src/defaultCharDataLoader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defaultCharDataLoader.js b/src/defaultCharDataLoader.js index 12476a9..1c87df7 100644 --- a/src/defaultCharDataLoader.js +++ b/src/defaultCharDataLoader.js @@ -1,5 +1,5 @@ const VERSION = '2.0'; -const getCharDataUrl = (char) => `https://cdn.jsdelivr.net/npm/hanzi-writer-data@${VERSION}/${char}.json`; +const getCharDataUrl = (char) => `https://cdn.jsdelivr.net/npm/hanzi-writer-data@${VERSION}/${encodeURIComponent(char)}.json`; export default (char, onLoad, onError) => { wx.request({