mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
core: Apply declarations styles (#7166)
This commit is contained in:
@@ -25,7 +25,7 @@ namespace Jackett.Common.Utils
|
||||
public static string DecodeCloudFlareProtectedEmail(string input)
|
||||
{
|
||||
var key = Convert.ToInt32(input.Substring(0, 2), 16);
|
||||
string result = "";
|
||||
var result = "";
|
||||
for (var i = 2; i < input.Length - 1; i += 2)
|
||||
{
|
||||
var hexChar = input.Substring(i, 2);
|
||||
@@ -39,13 +39,13 @@ namespace Jackett.Common.Utils
|
||||
// decode cloudflare protected emails in a HTML document
|
||||
public static string DecodeCloudFlareProtectedEmailFromHTML(string html)
|
||||
{
|
||||
Regex CFEMailRegex = new Regex("<span class=\"__cf_email__\" data-cfemail=\"(\\w+)\">\\[email protected\\]<\\/span><script data-cfhash='[\\w]+' type=\"text\\/javascript\">.*?<\\/script>", RegexOptions.Compiled);
|
||||
var CFEMailRegex = new Regex("<span class=\"__cf_email__\" data-cfemail=\"(\\w+)\">\\[email protected\\]<\\/span><script data-cfhash='[\\w]+' type=\"text\\/javascript\">.*?<\\/script>", RegexOptions.Compiled);
|
||||
var CFEMailRegexMatches = CFEMailRegex.Match(html);
|
||||
|
||||
while (CFEMailRegexMatches.Success)
|
||||
{
|
||||
string all = CFEMailRegexMatches.Groups[0].Value;
|
||||
string cfemail = CFEMailRegexMatches.Groups[1].Value;
|
||||
var all = CFEMailRegexMatches.Groups[0].Value;
|
||||
var cfemail = CFEMailRegexMatches.Groups[1].Value;
|
||||
var decoded = DecodeCloudFlareProtectedEmail(cfemail);
|
||||
html = html.Replace(all, decoded);
|
||||
CFEMailRegexMatches = CFEMailRegexMatches.NextMatch();
|
||||
|
Reference in New Issue
Block a user