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():
|
for name,value in source.source.items():
|
||||||
if name.startswith('planet_'):
|
if name.startswith('planet_'):
|
||||||
output['channel_' + name[7:]] = String(value)
|
output['channel_' + name[7:]] = String(value)
|
||||||
if not output.get('channel_name'):
|
if not output.get('channel_name') and \
|
||||||
output['channel_name'] = source.source.get('title', '')
|
source.source.has_key('title_detail'):
|
||||||
|
output['channel_name'] = Plain(source.source.title_detail.value)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<!--
|
<!--
|
||||||
Description: id
|
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">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<entry>
|
<entry>
|
||||||
<source>
|
<source>
|
||||||
<title>blog title</title>
|
<title type="html">Señor Frog</title>
|
||||||
</source>
|
</source>
|
||||||
</entry>
|
</entry>
|
||||||
</feed>
|
</feed>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user