Handle markup and unicode in titles as channel names
This commit is contained in:
parent
c8465307e3
commit
f9647ad36a
@ -167,8 +167,9 @@ def tmpl_mapper(source, rules):
|
||||
for name,value in source.source.items():
|
||||
if name.startswith('planet_'):
|
||||
output['channel_' + name[7:]] = String(value)
|
||||
if not output.get('channel_name'):
|
||||
output['channel_name'] = source.source.get('title', '')
|
||||
if not output.get('channel_name') and \
|
||||
source.source.has_key('title_detail'):
|
||||
output['channel_name'] = Plain(source.source.title_detail.value)
|
||||
|
||||
return output
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
<!--
|
||||
Description: id
|
||||
Expect: Items[0]['channel_name'] == 'blog title'
|
||||
Expect: Items[0]['channel_name'] == 'Se\xc3\xb1or Frog'
|
||||
-->
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<entry>
|
||||
<source>
|
||||
<title>blog title</title>
|
||||
<title type="html">Señor Frog</title>
|
||||
</source>
|
||||
</entry>
|
||||
</feed>
|
||||
|
Loading…
x
Reference in New Issue
Block a user