I think the result (local resources use domain relative paths like "/templates/src/..." is probably more useful than having absolute urls that point at "https://login.microsoft.com/template/src" and don't resolve.
Alternatively, use an absolute url that is clearly a placeholder, like https://localhost/ or https://static.contoso.com/.
The following trivial patch, and rerunning would handle this.
// Change the directory name for the legacy template
if (htmlFileURI.IndexOf("templates/") < 0)
{
reply = reply.Replace("https://login.microsoftonline.com/static/tenant/default/img/",
"https://login.microsoftonline.com/static/tenant/templates/classic/img/");
}
+ // Use domain relative urls.
+ reply = reply.Replace("https://login.microsoftonline.com/", "/");
+
// Remove the static tenant
reply = reply.Replace("/static/tenant/", "/");
// Add the src folder to the path
reply = reply.Replace("/templates/", "/templates/src/");
File.WriteAllText(localpath, reply);
I think the result (local resources use domain relative paths like "/templates/src/..." is probably more useful than having absolute urls that point at "https://login.microsoft.com/template/src" and don't resolve.
Alternatively, use an absolute url that is clearly a placeholder, like
https://localhost/
orhttps://static.contoso.com/
.The following trivial patch, and rerunning would handle this.
Thoughts?