Skip to content

Commit

Permalink
fix SetComposedLookByUrl with Uri.UnescapeDataString when string is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Zuellig committed Oct 21, 2021
1 parent 668a644 commit cf4a5c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/PnP.Framework/Extensions/BrandingExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ public static void SetComposedLookByUrl(this Web web, string lookName, string pa
}

//URL decode retrieved URL's
paletteUrl = Uri.UnescapeDataString(paletteUrl);
fontUrl = Uri.UnescapeDataString(fontUrl);
backgroundUrl = Uri.UnescapeDataString(backgroundUrl);
masterUrl = Uri.UnescapeDataString(masterUrl);
paletteUrl = !string.IsNullOrWhiteSpace(paletteUrl)?Uri.UnescapeDataString(paletteUrl):default(string);
fontUrl = !string.IsNullOrWhiteSpace(fontUrl)?Uri.UnescapeDataString(fontUrl):default(string);
backgroundUrl = !string.IsNullOrWhiteSpace(backgroundUrl)?Uri.UnescapeDataString(backgroundUrl):default(string);
masterUrl = !string.IsNullOrWhiteSpace(masterUrl)?Uri.UnescapeDataString(masterUrl):default(string);

if (!string.IsNullOrEmpty(masterUrl))
{
Expand Down

0 comments on commit cf4a5c2

Please sign in to comment.