Skip to content

Commit

Permalink
Merge pull request #496 from c0bra61/loading_escape_fix
Browse files Browse the repository at this point in the history
Fixed string escaping in when calling `DownloadFile` and `SetStatusChanged`
  • Loading branch information
garrynewman committed Sep 24, 2013
2 parents 77207b3 + b69430b commit d0de762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions garrysmod/lua/menu/loading.lua
Expand Up @@ -130,12 +130,12 @@ function PANEL:StatusChanged( strStatus )
if ( string.find( strStatus, "Downloading " ) ) then
local Filename = string.gsub( strStatus, "Downloading ", "" )
Filename = string.gsub( Filename, "'", "\'" )
Filename = string.gsub( Filename, "'", "\\'" )
self:RunJavascript( "if ( window.DownloadingFile ) DownloadingFile( '" .. Filename .. "' )" );
return end
strStatus = string.gsub( strStatus, "'", "\'" )
strStatus = string.gsub( strStatus, "'", "\\'" )
self:RunJavascript( "if ( window.SetStatusChanged ) SetStatusChanged( '" .. strStatus .. "' )" );
end
Expand Down

0 comments on commit d0de762

Please sign in to comment.