aboutsummaryrefslogtreecommitdiff
path: root/Emby.Dlna/PlayTo
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2023-07-06 19:56:00 +0200
committerGitHub <noreply@github.com>2023-07-06 19:56:00 +0200
commitb95fa294c9e896349c528c032508b9c714c13395 (patch)
tree7b85758236caae303e54814f6a13051a3218b60e /Emby.Dlna/PlayTo
parentfb9412b65a569f06364ba77841a287c23d142f73 (diff)
parent83d6f21fd021c66ab3b1f6501ecdfd016fee540f (diff)
Merge pull request #9799 from Bond-009/genregex
Diffstat (limited to 'Emby.Dlna/PlayTo')
-rw-r--r--Emby.Dlna/PlayTo/DlnaHttpClient.cs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Emby.Dlna/PlayTo/DlnaHttpClient.cs b/Emby.Dlna/PlayTo/DlnaHttpClient.cs
index 8b983e9e3d..8454c1afd3 100644
--- a/Emby.Dlna/PlayTo/DlnaHttpClient.cs
+++ b/Emby.Dlna/PlayTo/DlnaHttpClient.cs
@@ -31,6 +31,9 @@ namespace Emby.Dlna.PlayTo
_httpClientFactory = httpClientFactory;
}
+ [GeneratedRegex("(&(?![a-z]*;))")]
+ private static partial Regex EscapeAmpersandRegex();
+
private static string NormalizeServiceUrl(string baseUrl, string serviceUrl)
{
// If it's already a complete url, don't stick anything onto the front of it
@@ -128,12 +131,5 @@ namespace Emby.Dlna.PlayTo
// Have to await here instead of returning the Task directly, otherwise request would be disposed too soon
return await SendRequestAsync(request, cancellationToken).ConfigureAwait(false);
}
-
- /// <summary>
- /// Compile-time generated regular expression for escaping ampersands.
- /// </summary>
- /// <returns>Compiled regular expression.</returns>
- [GeneratedRegex("(&(?![a-z]*;))")]
- private static partial Regex EscapeAmpersandRegex();
}
}