diff --git a/package.json b/package.json index fb313e2..e5064c0 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "dotenv": "^4.0.0", "extract-text-webpack-plugin": "^3.0.0", "file-loader": "^0.11.2", + "he": "^1.1.1", "html-loader": "^0.5.0", "html-webpack-plugin": "^2.30.1", "ical.js": "^1.2.2", diff --git a/src/js/data/inkipediaGear.json b/src/js/data/inkipediaGear.json index 8708397..01c5f79 100644 --- a/src/js/data/inkipediaGear.json +++ b/src/js/data/inkipediaGear.json @@ -37,7 +37,7 @@ }, { "brand": "8", - "name": "Baby-Jelly Shirt & Tie", + "name": "Baby-Jelly Shirt & Tie", "price": 3800, "rarity": 1, "skill": "13" @@ -436,7 +436,7 @@ }, { "brand": "8", - "name": "Shirt & Tie", + "name": "Shirt & Tie", "price": 8400, "rarity": 2, "skill": "6" @@ -1049,7 +1049,7 @@ }, { "brand": "16", - "name": "Blue & Black Squidkid IV", + "name": "Blue & Black Squidkid IV", "price": 11000, "rarity": 2, "skill": "9" @@ -1259,7 +1259,7 @@ }, { "brand": "16", - "name": "Red & Black Squidkid IV", + "name": "Red & Black Squidkid IV", "price": 11000, "rarity": 2, "skill": "5" diff --git a/src/updater/updateGear.js b/src/updater/updateGear.js index 40f1413..8e14fd7 100644 --- a/src/updater/updateGear.js +++ b/src/updater/updateGear.js @@ -8,6 +8,7 @@ const mkdirp = require('mkdirp'); const axios = require('axios'); const retrieveGearData = require('./retrieveGearData'); const stringify = require('json-stable-stringify'); +const he = require('he'); const dataPath = path.resolve('src/js/data'); const brandsFilename = `${dataPath}/brands.json`; @@ -72,7 +73,7 @@ function applyData(oldData, newData) { let details = /name=(.*?)\|brand=(.*?)\|cost=(.*?)\|ability=(.*?)\|rarity=(.*?)\|/.exec(row[0]); if (details) { inkipediaGear[key].push({ - name: details[1], + name: he.decode(details[1]), brand: details[2], price: parseInt(details[3].replace(',', '')), skill: details[4], diff --git a/yarn.lock b/yarn.lock index 3fda2e8..3cc3a2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2404,7 +2404,7 @@ hawk@~6.0.2: hoek "4.x.x" sntp "2.x.x" -he@1.1.x, he@^1.1.0: +he@1.1.x, he@^1.1.0, he@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"