From ccd8c902676e58340884fb778a84f8f343ec5508 Mon Sep 17 00:00:00 2001 From: AyrisAI Date: Fri, 21 Aug 2026 00:07:43 +0300 Subject: [PATCH] fix(mobile): decode XML entities for react-native-svg text rendering --- apps/mobile/src/app/menu/qr.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/app/menu/qr.tsx b/apps/mobile/src/app/menu/qr.tsx index 623696a..7effaf4 100644 --- a/apps/mobile/src/app/menu/qr.tsx +++ b/apps/mobile/src/app/menu/qr.tsx @@ -48,7 +48,15 @@ export default function QrScreen() { // Yorum satırlarını temizle + iç içe taglarını doğru saymak için depth tracking kullan function buildSvgWithQr(svgRaw: string, pngBase64: string): string { // react-native-svg XML parser desteklemez - const clean = svgRaw.replace(//g, ""); + // Ayrıca text node'lardaki & < gibi entity'leri decode et + const clean = svgRaw + .replace(//g, "") + .replace(/&/g, "&") + .replace(/</g, "<") + .replace(/>/g, ">") + .replace(/'/g, "'") + .replace(/"/g, '"'); + const startMarker = '