Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Strip quotes when matching meta tags ("modern")
  • Loading branch information
da2x committed Aug 5, 2015
1 parent 682f80d commit 6abfa08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nikola/plugins/task/sitemap/__init__.py
Expand Up @@ -184,11 +184,11 @@ def scan_locs():
continue

""" ignores "html" files with noindex robot directives """
robots_directives = [b'<meta content="noindex" name="robots"',
b'<meta content="none" name="robots"',
b'<meta name="robots" content="noindex"',
b'<meta name="robots" content="none"']
if any([robot_directive in filehead.lower() for robot_directive in robots_directives]):
robots_directives = [b'<meta content=noindex name=robots',
b'<meta content=none name=robots',
b'<meta name=robots content=noindex',
b'<meta name=robots content=none']
if any([robot_directive in filehead.lower().replace('"', '')s for robot_directive in robots_directives]):
continue

# put Atom and RSS in sitemapindex[] instead of in urlset[],
Expand Down

0 comments on commit 6abfa08

Please sign in to comment.