Skip to content
This repository was archived by the owner on Apr 6, 2024. It is now read-only.

Commit 43f14de

Browse files
authored
Use WithEnding extension to enforce trailing slash (#327)
1 parent b6f40b4 commit 43f14de

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/Cake.Issues.Reporting.Generic/Templates/DxDataGrid.cshtml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,13 @@
5555
IdeIntegrationSettings ideIntegrationSettings = ViewBagHelper.ValueOrDefault<IdeIntegrationSettings>(ViewBag.IdeIntegrationSettings, null);
5656
List<HtmlDxDataGridColumnDescription> additionalColumns = ViewBagHelper.ValueOrDefault(ViewBag.AdditionalColumns, new List<HtmlDxDataGridColumnDescription>());
5757
string jQueryLocation = ViewBagHelper.ValueOrDefault(ViewBag.JQueryLocation, "https://ajax.aspnetcdn.com/ajax/jquery/").Trim();
58+
jQueryLocation = jQueryLocation.WithEnding("/");
5859
string jQueryVersion = ViewBagHelper.ValueOrDefault(ViewBag.JQueryVersion, "3.5.0").Trim();
5960
string jsZipLocation = ViewBagHelper.ValueOrDefault(ViewBag.JsZipLocation, "https://cdnjs.cloudflare.com/ajax/libs/jszip/").Trim();
61+
jsZipLocation = jsZipLocation.WithEnding("/");
6062
string jsZipVersion = ViewBagHelper.ValueOrDefault(ViewBag.JsZipVersion, "3.2.2").Trim();
6163
string devExtremeLocation = ViewBagHelper.ValueOrDefault(ViewBag.DevExtremeLocation, "https://cdn3.devexpress.com/jslib/").Trim();
64+
devExtremeLocation = devExtremeLocation.WithEnding("/");
6265
string devExtremeVersion = ViewBagHelper.ValueOrDefault(ViewBag.DevExtremeVersion, "20.1.6").Trim();
6366
}
6467

@@ -86,21 +89,6 @@
8689
addRuleUrl: ruleVisible || ruleUrlVisible,
8790
addMessageHtml: messageVisible,
8891
additionalValues: additionalColumns.ToDictionary(x => x.Id, x => x.ValueRetriever));
89-
90-
if (!jQueryLocation.EndsWith("/"))
91-
{
92-
jQueryLocation += "/";
93-
}
94-
95-
if (!jsZipLocation.EndsWith("/"))
96-
{
97-
jsZipLocation += "/";
98-
}
99-
100-
if (!devExtremeLocation.EndsWith("/"))
101-
{
102-
devExtremeLocation += "/";
103-
}
10492
}
10593

10694
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

0 commit comments

Comments
 (0)