Browse Source

more strict match for XKCD comics

allows the XKCD XML feeds to be parsed with the feed parser
pull/49/head
Aaron Parecki 3 years ago
parent
commit
d67e76f4b5
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lib/XRay/Formats/XKCD.php

+ 1
- 1
lib/XRay/Formats/XKCD.php View File

@ -12,7 +12,7 @@ class XKCD extends Format {
}
public static function matches($url) {
return self::matches_host($url) && parse_url($url, PHP_URL_PATH) != '/';
return self::matches_host($url) && preg_match('/^\/\d+\/$/', ''.parse_url($url, PHP_URL_PATH));
}
public static function parse($html, $url) {

Loading…
Cancel
Save