OSDN Git Service

escape HTML chars from topic & channel name, closes #12062
authormorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Sat, 15 Mar 2008 09:09:26 +0000 (09:09 +0000)
committermorimoto <morimoto@180c8125-5b33-4295-ad04-72a68a15b4cc>
Sat, 15 Mar 2008 09:09:26 +0000 (09:09 +0000)
lib/plugins/00all
lib/plugins/00index
lib/plugins/00location
lib/plugins/00location_receiver
lib/plugins/00nick
lib/plugins/00topic
lib/plugins/00unread
lib/templates/address.html

index 70ec57d..0662446 100644 (file)
@@ -1,7 +1,7 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00all
 # \83`\83\83\83l\83\8b\82Ì\91S\83\81\83b\83Z\81[\83W\89{\97\97
-# $Id: 00all,v 1.4 2008-02-25 15:46:31 morimoto Exp $
+# $Id: 00all,v 1.5 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00all,v $
 
 $plugin = {
@@ -28,7 +28,7 @@ $plugin = {
 
                my $p;
                $p->{buf} = $buf;
-               $p->{channel_compact} = $::ib->compact_channel_name($cid);
+               $p->{channel_compact} = $::ib->simple_escape($::ib->compact_channel_name($cid));
                $p->{cid} = $cid;
                return $view->render('all.html', $p);
        }
index 2ca1d7f..1bf57d0 100644 (file)
@@ -1,7 +1,7 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00index
 # \83`\83\83\83l\83\8b\88ê\97\97
-# $Id: 00index,v 1.4 2008-01-18 16:50:35 morimoto Exp $
+# $Id: 00index,v 1.5 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00index,v $
 
 $plugin = {
@@ -37,7 +37,7 @@ $plugin = {
                for my $cid ($::ib->channels()){
                        my $p = {};
                        my $channel = $::ib->cid2name($cid);
-                       my $cname = $::ib->compact_channel_name($cid);
+                       my $cname = $::ib->simple_escape($::ib->compact_channel_name($cid));
                        if($accesskey < 10){
                                $p->{link} =
                                        sprintf('<a accesskey="%1d" href="all/%d">[%1d] %s</a>',
index 9111d0c..61c1d76 100644 (file)
@@ -3,7 +3,7 @@
 # °ÌÃÖ¾ðÊóÁ÷¿®
 # ¸½ºß¤Þ¤À au ÀìÍÑ
 # 
-# $Id: 00location,v 1.3 2008-01-14 14:05:48 morimoto Exp $
+# $Id: 00location,v 1.4 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00location,v $
 
 # http://siisise.net/gps.html
@@ -26,7 +26,7 @@ $plugin = {
                $p->{web_port} = $::cf->web_port();
                $p->{session_id} = $session_id;
                $p->{cid} = $cid;
-               $p->{channel_compact} = $::ib->compact_channel_name($cid);
+               $p->{channel_compact} = $::ib->simple_escape($::ib->compact_channel_name($cid));
                return $view->render('location.html', $p);
        }
 };
index 6756e29..933afa0 100644 (file)
@@ -2,7 +2,7 @@
 # keitairc/lib/plugins/00location_receiver
 # °ÌÃÖ¾ðÊóÁ÷¿®¡¢¤Î¥³¡¼¥ë¥Ð¥Ã¥¯
 #
-# $Id: 00location_receiver,v 1.4 2008-02-23 20:43:36 morimoto Exp $
+# $Id: 00location_receiver,v 1.5 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00location_receiver,v $
 
 use Net::HTTP;
@@ -84,7 +84,7 @@ $plugin = {
                my $p;
                $p->{session_id} = $session_id;
                $p->{cid} = $cid;
-               $p->{channel_compact} = $::ib->compact_channel_name($cid);
+               $p->{channel_compact} = $::ib->simple_escape($::ib->compact_channel_name($cid));
 
                # Â¬ÃÏ·Ï
                # °Ê²¼¤Î2¤Ä¤Î¬ÃϷϤÎÃ椫¤é»ÈÍѤ·¤Æ¤¤¤ë¬ÃϷϤò¼¨¤¹¡£
index 554525a..422c514 100644 (file)
@@ -1,7 +1,7 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00nick
 # nick\88ê\97\97
-# $Id: 00nick,v 1.2 2008-01-13 15:31:09 morimoto Exp $
+# $Id: 00nick,v 1.3 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00nick,v $
 
 $plugin = {
@@ -22,7 +22,7 @@ $plugin = {
                my $ci = new Keitairc::ClientInfo($request);
                my $view = new Keitairc::View($::cf, $ci);
                return $view->render('nick.html', {
-                       channel_compact => $::ib->compact_channel_name($cid),
+                       channel_compact => $::ib->simple_escape($::ib->compact_channel_name($cid)),
                        loop => \@loop
                             });
        }
index 23b5ee4..79a1fb8 100644 (file)
@@ -1,7 +1,7 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00topic
 # \83g\83s\83b\83N\88ê\97\97
-# $Id: 00topic,v 1.2 2008-01-13 15:31:09 morimoto Exp $
+# $Id: 00topic,v 1.3 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00topic,v $
 
 $plugin = {
@@ -15,9 +15,10 @@ $plugin = {
                        my $topic;
                        $buf .= sprintf(' <a href="all/%d">%s</a><br />',
                                        $cid,
-                                       $::ib->compact_channel_name($cid));
+                                       $::ib->simple_escape($::ib->compact_channel_name($cid)));
                        if($topic = $::ib->topic($cid)){
                                Encode::from_to($topic, 'jis', 'shiftjis');
+                               $topic = $::ib->simple_escape($topic);
                        }else{
                                $topic = '(ÄË߯¸\96¢\90Ý\92è)';
                        }
index 06bc68a..2eca23f 100644 (file)
@@ -1,7 +1,7 @@
 # -*-perl-*-
 # keitairc/lib/plugins/00unread
 # \83`\83\83\83l\83\8b\82Ì\96¢\93Ç\83\81\83b\83Z\81[\83W\89{\97\97
-# $Id: 00unread,v 1.4 2008-02-25 15:46:31 morimoto Exp $
+# $Id: 00unread,v 1.5 2008-03-15 09:09:26 morimoto Exp $
 # $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/plugins/00unread,v $
 
 $plugin = {
@@ -27,7 +27,7 @@ $plugin = {
                my $view = new Keitairc::View($::cf, $ci);
                return $view->render('unread.html', {
                        buf => $buf,
-                       channel_compact => $::ib->compact_channel_name($cid),
+                       channel_compact => $::ib->simple_escape($::ib->compact_channel_name($cid)),
                        cid => $cid,
                             });
        }
index 1e474a3..af1d0eb 100644 (file)
@@ -22,7 +22,8 @@
     </form>
 
     <form method="post" action="<!-- tmpl_var root --><!-- tmpl_var session_id -->/postme">
-      <input type="hidden" name="text" value="<!-- tmpl_var address -->" />
+      <input type="hidden" name="text" value="<!-- tmpl_var address -->
+http://www.google.co.jp/m/lcb?mp=1&uipref=3&source=m&ie=Shift_JIS&action=chglog&loc=<!-- tmpl_var address -->" />
       <input type="submit" accesskey="2" value="[2] ÒÓ\91\97\90M"><br />
     </form>