From 61010f787eb771258aa49418bea2cd362558224c Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Fri, 21 Nov 2025 22:45:37 -0500 Subject: [PATCH 1/3] fix: html decode show hosts on home (#147) --- package-lock.json | 10 ++++++++++ package.json | 3 ++- src/app/Home/index.tsx | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb1dcb6..e7360e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@react-navigation/bottom-tabs": "^7.4.9", "@react-navigation/native": "^7.1.18", "@react-navigation/native-stack": "^7.3.28", + "he": "^1.2.0", "react": "19.1.0", "react-native": "0.80.1", "react-native-gesture-handler": "^2.28.0", @@ -7482,6 +7483,15 @@ "node": ">= 0.4" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, "node_modules/hermes-estree": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.28.1.tgz", diff --git a/package.json b/package.json index 5a629f1..c60e787 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@react-navigation/bottom-tabs": "^7.4.9", "@react-navigation/native": "^7.1.18", "@react-navigation/native-stack": "^7.3.28", + "he": "^1.2.0", "react": "19.1.0", "react-native": "0.80.1", "react-native-gesture-handler": "^2.28.0", @@ -57,4 +58,4 @@ "engines": { "node": ">=18" } -} \ No newline at end of file +} diff --git a/src/app/Home/index.tsx b/src/app/Home/index.tsx index 1dcc6fc..fd2a3e1 100644 --- a/src/app/Home/index.tsx +++ b/src/app/Home/index.tsx @@ -1,4 +1,5 @@ import React, { useEffect, useState, useMemo, useCallback } from 'react'; +import he from 'he'; import { debugError } from '@utils/Debug'; import { View, @@ -94,7 +95,7 @@ export default function HomeScreen() { const unsubscribeMetadata = metadataService.subscribe((data: ShowInfo) => { setShowInfo(data); setCurrentShow(data.showTitle); - setHosts(data.hosts); + setHosts(he.decode(data.hosts)); setShowDescription(data.description); try { From 118fd8b4cf9acebe7879bcd9ad8b4193082d751e Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sat, 22 Nov 2025 10:38:14 -0500 Subject: [PATCH 2/3] fix: add he types --- package-lock.json | 8 ++++++++ package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/package-lock.json b/package-lock.json index e7360e0..5fd2be5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,6 +38,7 @@ "@react-native/metro-config": "0.80.1", "@react-native/typescript-config": "0.80.1", "@testing-library/react-native": "^13.3.0", + "@types/he": "^1.2.3", "@types/jest": "^29.5.13", "@types/react": "^19.1.0", "@types/react-native-vector-icons": "^6.4.18", @@ -3641,6 +3642,13 @@ "integrity": "sha512-ynRvcq6wvqexJ9brDMS4BnBLzmr0e14d6ZJTEShTBWKymQiHwlAyGu0ZPEFI2Fh1U53F7tN9ufClWM5KvqkKOw==", "license": "MIT" }, + "node_modules/@types/he": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/he/-/he-1.2.3.tgz", + "integrity": "sha512-q67/qwlxblDzEDvzHhVkwc1gzVWxaNxeyHUBF4xElrvjL11O+Ytze+1fGpBHlr/H9myiBUaUXNnNPmBHxxfAcA==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", diff --git a/package.json b/package.json index c60e787..c624152 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@react-native/metro-config": "0.80.1", "@react-native/typescript-config": "0.80.1", "@testing-library/react-native": "^13.3.0", + "@types/he": "^1.2.3", "@types/jest": "^29.5.13", "@types/react": "^19.1.0", "@types/react-native-vector-icons": "^6.4.18", From 7004434bb697704accb14523292b69e66f217527 Mon Sep 17 00:00:00 2001 From: Jay Sitter Date: Sat, 22 Nov 2025 10:38:22 -0500 Subject: [PATCH 3/3] fix: fix typescript warning --- src/app/Home/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Home/index.tsx b/src/app/Home/index.tsx index fd2a3e1..15ee778 100644 --- a/src/app/Home/index.tsx +++ b/src/app/Home/index.tsx @@ -95,7 +95,7 @@ export default function HomeScreen() { const unsubscribeMetadata = metadataService.subscribe((data: ShowInfo) => { setShowInfo(data); setCurrentShow(data.showTitle); - setHosts(he.decode(data.hosts)); + setHosts(he.decode(data.hosts || '')); setShowDescription(data.description); try {