@@ -339,7 +339,7 @@ def _prepare(self, channel):
339
339
# cat_id = get_text_tag(cat, '{{{0}}}term_id'.format(wordpress_namespace), None)
340
340
cat_slug = get_text_tag (cat , '{{{0}}}category_nicename' .format (wordpress_namespace ), None )
341
341
cat_parent_slug = get_text_tag (cat , '{{{0}}}category_parent' .format (wordpress_namespace ), None )
342
- cat_name = get_text_tag (cat , '{{{0}}}cat_name' .format (wordpress_namespace ), None )
342
+ cat_name = utils . html_unescape ( get_text_tag (cat , '{{{0}}}cat_name' .format (wordpress_namespace ), None ) )
343
343
cat_path = [cat_name ]
344
344
if cat_parent_slug in cat_map :
345
345
cat_path = cat_map [cat_parent_slug ] + cat_path
@@ -824,16 +824,16 @@ def _create_metadata(self, status, excerpt, tags, categories, post_name=None):
824
824
if text in self ._category_paths :
825
825
cats .append (self ._category_paths [text ])
826
826
else :
827
- cats .append (utils .join_hierarchical_category_path ([text ]))
827
+ cats .append (utils .join_hierarchical_category_path ([utils . html_unescape ( text ) ]))
828
828
other_meta ['categories' ] = ',' .join (cats )
829
829
if len (cats ) > 0 :
830
830
other_meta ['category' ] = cats [0 ]
831
831
if len (cats ) > 1 :
832
832
LOGGER .warn (('Post "{0}" has more than one category! ' +
833
833
'Will only use the first one.' ).format (post_name ))
834
- tags_cats = tags
834
+ tags_cats = [ utils . html_unescape ( tag ) for tag in tags ]
835
835
else :
836
- tags_cats = tags + categories
836
+ tags_cats = [ utils . html_unescape ( tag ) for tag in tags + categories ]
837
837
return tags_cats , other_meta
838
838
839
839
_tag_sanitize_map = {True : {}, False : {}}
0 commit comments