Index: assets/tmpl/include/header.html =================================================================== --- assets/tmpl/include/header.html (revision 1049) +++ assets/tmpl/include/header.html (working copy) @@ -52,3 +52,4 @@ +[% USE URIEncode %] Index: assets/tmpl/recent.html =================================================================== --- assets/tmpl/recent.html (revision 1049) +++ assets/tmpl/recent.html (working copy) @@ -3,7 +3,7 @@ [% FOR channel IN target_channels %]
[% channel_name.item(channel) | html %] - more..
+ more..
[% FOR line IN channel_recent.item(channel) %] Index: assets/tmpl/topics.html =================================================================== --- assets/tmpl/topics.html (revision 1049) +++ assets/tmpl/topics.html (working copy) @@ -1,7 +1,7 @@ [% INCLUDE 'include/header.html' %] [% FOR canon_channel IN channel_name.keys.sort %] - [% channel_name.item(canon_channel) | html %]
+ [% channel_name.item(canon_channel) | html %]
[% channel_topic.item(canon_channel) %]
[% END %]
Index: assets/tmpl/keyword.html =================================================================== --- assets/tmpl/keyword.html (revision 1049) +++ assets/tmpl/keyword.html (working copy) @@ -6,7 +6,7 @@
keyword
[% FOR row IN rows %] - [% render_line(row) %]([% row.channel | html %])
+ [% render_line(row) %]([% row.channel | html %])
[% END %]
Index: assets/tmpl/index.html =================================================================== --- assets/tmpl/index.html (revision 1049) +++ assets/tmpl/index.html (working copy) @@ -22,7 +22,7 @@ [% accesskey %] [% END %] - + [%- ELSE %] [% SWITCH mobile_agent.carrier %] @@ -36,13 +36,13 @@ * [% END %] - + [%- END -%] [% compact_channel_name(channel) %] [% IF unread_lines.item(canon_channel) %] - [% unread_lines.item(canon_channel) %] + [% unread_lines.item(canon_channel) %] [% END %]
Index: assets/tmpl/show_channel.html =================================================================== --- assets/tmpl/show_channel.html (revision 1049) +++ assets/tmpl/show_channel.html (working copy) @@ -3,7 +3,7 @@ -
+ [% IF user_agent.match('(iPod|iPhone)') %] [% ELSE %] @@ -20,7 +20,7 @@ [% render_line( line ) %]
[% END %]
- more[5]
+ more[5]
[% ELSE %] [% FOR line IN channel_buffer.item(canon_channel).reverse() %] [% render_line( line ) %]
Index: lib/Template/Plugin/URIEncode.pm =================================================================== --- lib/Template/Plugin/URIEncode.pm (revision 0) +++ lib/Template/Plugin/URIEncode.pm (revision 0) @@ -0,0 +1,33 @@ +package Template::Plugin::URIEncode; + +use strict; +use vars qw($VERSION); +$VERSION = 0.01; + +require Template::Plugin; +use base qw(Template::Plugin); +use Encode; + +use vars qw($FILTER_NAME); +$FILTER_NAME = 'uriencode'; + +my %table; +my $re; +sub new { + my($self, $context, @args) = @_; + my $name = $args[0] || $FILTER_NAME; + $context->define_filter($name, \&uriencode, 0); + + return $self; +} + +sub uriencode { + my $str = shift; + + $str = Encode::encode('utf-8', $str); + $str =~ s/([^A-Za-z0-9])/'%'.unpack('H2', $1)/eg; + + return $str; +} + +1;