Skip to content

Commit

Permalink
Fix handling of ' ' in product name
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
pbatard committed Nov 23, 2019
1 parent 3c4fafa commit aa378ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Fido.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Fido v1.14 - Retail Windows ISO Downloader
# Fido v1.15 - Retail Windows ISO Downloader
# Copyright © 2019 Pete Batard <[email protected]>
# ConvertTo-ImageSource: Copyright © 2016 Chris Carter
#
Expand Down Expand Up @@ -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("&nbsp;", " ")
$html = $html.Replace("IsoX86", """x86""")
$html = $html.Replace("IsoX64", """x64""")
$html = "<inputs>" + $html + "</inputs>"
Expand All @@ -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)
Expand Down

0 comments on commit aa378ca

Please sign in to comment.