From 676e46f59f3efa8d91d0d008492b104635be55bc Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Sat, 29 Jun 2024 00:23:21 +0300 Subject: [PATCH] Add New Escape Character 'Em Dash' to 'Compile.ps1' File (#2153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will Insure that an App Entry can use the '—' Character (aka. the 'Em Dash' Character) in their Content (Title) and Description Fields without any worries. --- Compile.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Compile.ps1 b/Compile.ps1 index e0f4c6d4..84217b37 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -49,11 +49,11 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach- # Note: Avoid using HTML Entity Codes (for example '”' (stands for "Right Double Quotation Mark")), and use HTML decimal/hex codes instead. # as using HTML Entity Codes will result in XML parse Error when running the compiled script. if ($jsonAsObject.$firstLevelName.content -ne $null) { - $jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>') + $jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—') $jsonAsObject.$firstLevelName.content = $jsonAsObject.$firstLevelName.content.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop } if ($jsonAsObject.$firstLevelName.description -ne $null) { - $jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>') + $jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('&','&').replace('“','“').replace('”','”').replace("'",''').replace('<','<').replace('>','>').replace('—','—') $jsonAsObject.$firstLevelName.description = $jsonAsObject.$firstLevelName.description.replace('''',"'") # resolves the Double Apostrophe caused by the first replace function in the main loop } } @@ -110,4 +110,4 @@ if ($run){ Start-Process -FilePath "powershell" -ArgumentList ".\$scriptname" } -} \ No newline at end of file +}