bagder: curl-www last20threads.pl,1.14,1.15

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www
In directory labb:/tmp/cvs-serv8882

Modified Files:
	last20threads.pl 
Log Message:
unescape/escape HTML from the parsed subjects, but the CGI.pm doesn't like
&ndash; as used by hypermail!


Index: last20threads.pl
===================================================================
RCS file: /cvsroot/curl/curl-www/last20threads.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- last20threads.pl	19 Aug 2005 06:10:42 -0000	1.14
+++ last20threads.pl	15 Sep 2005 18:18:48 -0000	1.15
@@ -120,7 +120,7 @@
         my $subjectline=sprintf("<tr class=\"%s\"><td><a href=\"%s\">%s</a></td>\n",
                                 $line,
                                 file2url($_),
-                                $subj?$subj:"(no subject)");
+                                $subj?&CGI::escapeHTML($subj):"(no subject)");
 
         #20041105 11:05:25
         my $da = $log{$_};
@@ -189,7 +189,9 @@
             $email = $1;
         }
         elsif(/^<!-- subject=\"([^\"]*)\"/) {
-            $subject = $1;
+            my $hm = $1;
+            $hm =~ s/\&ndash;/-/g;
+            $subject = &CGI::unescapeHTML($hm);
         }
         elsif(/^<!-- inreplyto=\"([^\"]*)\"/) {
             $inreplyto = $1;

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.