From aa378cad1320682311507a98125721eef0baef97 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Sat, 23 Nov 2019 21:52:04 +0000 Subject: [PATCH] Fix handling of ' ' in product name * Some locales (e.g. Russian) will return something like "Windows 10" for the product name which threw our JSON conversion off * Also fix a typo * Closes #12 --- Fido.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Fido.ps1 b/Fido.ps1 index d930c7f..55dc32e 100644 --- a/Fido.ps1 +++ b/Fido.ps1 @@ -1,5 +1,5 @@ # -# Fido v1.14 - Retail Windows ISO Downloader +# Fido v1.15 - Retail Windows ISO Downloader # Copyright © 2019 Pete Batard # ConvertTo-ImageSource: Copyright © 2016 Chris Carter # @@ -637,6 +637,7 @@ $Continue.add_click({ $html = $html.Replace("class=product-download-hidden", "") $html = $html.Replace("type=hidden", "") $html = $html.Replace(">", "/>") + $html = $html.Replace(" ", " ") $html = $html.Replace("IsoX86", """x86""") $html = $html.Replace("IsoX64", """x64""") $html = "" + $html + "" @@ -652,7 +653,7 @@ $Continue.add_click({ } } if ($array.Length -eq 0) { - Throw-Error -Req $r -Alt "Could not retreive ISO download links" + Throw-Error -Req $r -Alt "Could not retrieve ISO download links" } } catch { Error($_.Exception.Message)