Holiday Changes (#1706)
* Fixed a bug on bookmark mode not finding correct image for prefetcher. * Fixed up the edit series relationship modal on tablet viewports. * On double page mode, only bookmark 1 page if only 1 pages is renderered on screen. * Added percentage read of a given library and average hours read per week to user stats. * Fixed a bug in the reader with paging in bookmark mode * Added a "This Week" option to top readers history * Added date ranges for reading time. Added dates that don't have anything, but might remove. * On phone, when applying a metadata filter, when clicking apply, collapse the filter automatically. * Disable jump bar and the resuming from last spot when a custom sort is applied. * Ensure all Regex.Replace or Matches have timeouts set
This commit is contained in:
parent
13c1787165
commit
7b51fdfb2e
26 changed files with 224 additions and 76 deletions
|
@ -535,8 +535,8 @@ public class BookService : IBookService
|
|||
|
||||
private static string EscapeTags(string content)
|
||||
{
|
||||
content = Regex.Replace(content, @"<script(.*)(/>)", "<script$1></script>");
|
||||
content = Regex.Replace(content, @"<title(.*)(/>)", "<title$1></title>");
|
||||
content = Regex.Replace(content, @"<script(.*)(/>)", "<script$1></script>", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
content = Regex.Replace(content, @"<title(.*)(/>)", "<title$1></title>", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
@ -995,12 +995,12 @@ public class BookService : IBookService
|
|||
}
|
||||
|
||||
// Remove comments from CSS
|
||||
body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty);
|
||||
body = Regex.Replace(body, @"/\*[\d\D]*?\*/", string.Empty, RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
|
||||
body = Regex.Replace(body, @"[a-zA-Z]+#", "#");
|
||||
body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty);
|
||||
body = Regex.Replace(body, @"\s+", " ");
|
||||
body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1");
|
||||
body = Regex.Replace(body, @"[a-zA-Z]+#", "#", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
body = Regex.Replace(body, @"[\n\r]+\s*", string.Empty, RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
body = Regex.Replace(body, @"\s+", " ", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
body = Regex.Replace(body, @"\s?([:,;{}])\s?", "$1", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
try
|
||||
{
|
||||
body = body.Replace(";}", "}");
|
||||
|
@ -1010,7 +1010,7 @@ public class BookService : IBookService
|
|||
//Swallow exception. Some css don't have style rules ending in ';'
|
||||
}
|
||||
|
||||
body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1");
|
||||
body = Regex.Replace(body, @"([\s:]0)(px|pt|%|em)", "$1", RegexOptions.None, Tasks.Scanner.Parser.Parser.RegexTimeout);
|
||||
|
||||
|
||||
return body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue