Explorar o código

update html preparation

Luke Pulverenti %!s(int64=8) %!d(string=hai) anos
pai
achega
ead2afcca0
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      MediaBrowser.WebDashboard/Api/PackageCreator.cs

+ 4 - 1
MediaBrowser.WebDashboard/Api/PackageCreator.cs

@@ -151,10 +151,13 @@ namespace MediaBrowser.WebDashboard.Api
                         if (index != -1)
                         {
                             html = html.Substring(index);
+
+                            html = html.Substring(html.IndexOf('>') + 1);
+
                             index = html.IndexOf("</body>", StringComparison.OrdinalIgnoreCase);
                             if (index != -1)
                             {
-                                html = html.Substring(0, index+7);
+                                html = html.Substring(0, index);
                             }
                         }
                         var mainFile = _fileSystem.ReadAllText(GetDashboardResourcePath("index.html"));