core: Apply declarations styles (#7166)

This commit is contained in:
Cory
2020-02-10 16:16:19 -06:00
committed by GitHub
parent e13cee2e95
commit 348dddfbee
149 changed files with 1039 additions and 1067 deletions

View File

@@ -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&#160;protected\\]<\\/span><script data-cfhash='[\\w]+' type=\"text\\/javascript\">.*?<\\/script>", RegexOptions.Compiled);
var CFEMailRegex = new Regex("<span class=\"__cf_email__\" data-cfemail=\"(\\w+)\">\\[email&#160;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();