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
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +1 −1 nikola/plugins/task/sitemap/__init__.py
@@ -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

This comment has been minimized.

Copy link

@muxuezi muxuezi replied Aug 17, 2015

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

@bnmnetp

This comment has been minimized.

Copy link
Contributor

@bnmnetp bnmnetp replied Aug 17, 2015

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

Please sign in to comment.