add preg_quote to user provided PCRE
This commit is contained in:
parent
daa489032b
commit
c50a9ee3b1
|
@ -167,7 +167,9 @@ function cpm_breakdown_comic_filename($filename, $allow_override = false) {
|
||||||
"m" => '[0-9]{2,2}',
|
"m" => '[0-9]{2,2}',
|
||||||
"d" => '[0-9]{2,2}'));
|
"d" => '[0-9]{2,2}'));
|
||||||
|
|
||||||
if (preg_match("/^(${pattern})(.*)\.[^\.]+$/", $filename, $matches) > 0) {
|
$pattern = preg_quote($pattern, "#");
|
||||||
|
|
||||||
|
if (preg_match("#^(${pattern})(.*)\.[^\.]+$#", $filename, $matches) > 0) {
|
||||||
list($all, $date, $title) = $matches;
|
list($all, $date, $title) = $matches;
|
||||||
|
|
||||||
if (strtotime($date) === false) { return false; }
|
if (strtotime($date) === false) { return false; }
|
||||||
|
|
Loading…
Reference in New Issue