Skip to content

Commit

Permalink
Handle escaping quotes for models using firmware < 6.2
Browse files Browse the repository at this point in the history
related: 943da05
  • Loading branch information
ljunkie committed Aug 25, 2015
1 parent a0a2098 commit 7f30867
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Plex/source/PlexMediaServer.brs
Original file line number Diff line number Diff line change
Expand Up @@ -505,14 +505,14 @@ End Function
'* relative to the server URL
Function FullUrl(serverUrl, sourceUrl, key) As String
' Replace quotes
if instr(1, tostr(key), """") > 0 then
rQuote = CreateObject("roRegex", """", "")
key = rQuote.ReplaceAll(key, HttpEncode(""""))
if instr(1, tostr(key), chr(34)) > 0 then
rQuote = CreateObject("roRegex", chr(34), "")
key = rQuote.ReplaceAll(key, HttpEncode(chr(34)))
end if

if instr(1, tostr(sourceUrl), """") > 0 then
rQuote = CreateObject("roRegex", """", "")
sourceUrl = rQuote.ReplaceAll(sourceUrl, HttpEncode(""""))
if instr(1, tostr(sourceUrl), chr(34)) > 0 then
rQuote = CreateObject("roRegex", chr(34), "")
sourceUrl = rQuote.ReplaceAll(sourceUrl, HttpEncode(chr(34)))
end if

finalUrl = ""
Expand Down

0 comments on commit 7f30867

Please sign in to comment.