Skip to content
Permalink
Browse files
Ignore sliced multibyte characters when reading metadata for sitemaps
  • Loading branch information
da2x committed Aug 9, 2015
1 parent 0860058 commit 4d859e026597ae1deee64681b5160fefd6962add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
@@ -12,6 +12,7 @@ Features
Bugfixes
--------

* Ignore sliced multibyte characters when reading metadata for sitemaps
* Handle folders without trailing slashes in nikola auto (Issue #1933)
* Set a base element to aid relative URL resolution, stripped on-the-fly
when using the auto or serve command to view site locally. (Issue #1922)
@@ -188,7 +188,7 @@ def scan_locs():
b'<meta content=none name=robots',
b'<meta name=robots content=noindex',
b'<meta name=robots content=none']
lowquothead = filehead.lower().decode('utf-8').replace('"', '').encode('utf-8')
lowquothead = filehead.lower().decode('utf-8', 'ignore').replace('"', '').encode('utf-8')
if any([robot_directive in lowquothead for robot_directive in robots_directives]):
continue

2 comments on commit 4d859e0

@muxuezi
Copy link

@muxuezi muxuezi commented on 4d859e0 Aug 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's ok, there is no error of sitemap any more

@bnmnetp
Copy link
Contributor

@bnmnetp bnmnetp commented on 4d859e0 Aug 17, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that change fixes the problem for me as well.

Please sign in to comment.