[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#242020: www.debian.org: security/dsa-long.en.rdf has HTML markup in <description> tag



Package: www.debian.org
Severity: wishlist
Tags: patch

I just added http://www.debian.org/security/dsa-long.en.rdf to my RSS
feed aggregator and realized that it does behave strangely.
AIUI, the description tag is not supposed to contain ordinary HTML markup
in RSS 1.0.  Since it is ment as a teaser anyway, and interested people
are supposed to follow the link (thats the rss design), I think it would
not hurt to be more standards compliant and simply strip well-known
HTML constructs.

Index: english/template/debian/recent_list.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/recent_list.wml,v
retrieving revision 1.115
diff -u -r1.115 recent_list.wml
--- english/template/debian/recent_list.wml	20 Feb 2004 08:18:24 -0000	1.115
+++ english/template/debian/recent_list.wml	4 Apr 2004 11:07:21 -0000
@@ -320,10 +320,12 @@
                 # HTML entities
                 $moreinfo =~ s/(&[^#;]+;)/&decodehtmlentity($1)/ge;
                 # <email "xxx"> <url "xxx">
-                $moreinfo =~ s#<email "([^>]+)">#<a href="mailto:$1";>$1</a>#g;
-                $moreinfo =~ s#<url "([^>]+)">#<a href="$1">$1</a>#g;
+                $moreinfo =~ s#<email "([^>]+)">#$1#g;
+                $moreinfo =~ s#<url "([^>]+)">#$1#g;
                 # HTML tags
-                $moreinfo =~ s/</&lt;/g;
+      		$moreinfo =~ s#</?p>##g; 
+		$moreinfo =~ s#<a [^>]+>([^<]*)</a>#$1#g;
+	        $moreinfo =~ s/</&lt;/g;
                 $moreinfo =~ s/>/&gt;/g;
                 $moreinfo =~ s/"/&quot;/g;
                 # WML continuation



-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang@db.debian.org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44

Attachment: pgpDDu8U2SIjZ.pgp
Description: PGP signature


Reply to: