Skip to content

Commit 068427c

Browse files
donkerbdukes
authored andcommitted
Check there is an extension at all
1 parent 70cadbb commit 068427c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

DNN Platform/DotNetNuke.Web.Client/Controls/DnnCssInclude.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ public DnnCssInclude(IClientResourceController clientResourceController)
4242
/// <inheritdoc />
4343
protected override void OnLoad(EventArgs e)
4444
{
45-
switch (this.FilePath.Substring(this.FilePath.LastIndexOf('.')).ToLowerInvariant())
45+
var extension = ".css";
46+
var hit = this.FilePath.LastIndexOf('.');
47+
if (hit > 0)
48+
{
49+
extension = this.FilePath.Substring(hit).ToLowerInvariant();
50+
}
51+
52+
switch (extension)
4653
{
4754
case ".eot":
4855
case ".woff":

0 commit comments

Comments
 (0)