[dw-free] Fix multiple-escapes in /data/userpics
[commit: http://hg.dwscoalition.org/dw-free/rev/cd51463743bc]
http://bugs.dwscoalition.org/show_bug.cgi?id=580
Stop double escaping output of /data/userpics feed. This now respects the
same behavior as on allpics: HTML from description/comment is stripped, and
keywords are just escaped.
Patch by
kfk2.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=580
Stop double escaping output of /data/userpics feed. This now respects the
same behavior as on allpics: HTML from description/comment is stripped, and
keywords are just escaped.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/ljfeed.pl
-------------------------------------------------------------------------------- diff -r 11050b94baf5 -r cd51463743bc cgi-bin/ljfeed.pl --- a/cgi-bin/ljfeed.pl Mon Aug 10 02:08:28 2009 +0000 +++ b/cgi-bin/ljfeed.pl Mon Aug 10 03:05:03 2009 +0000 @@ -908,19 +908,19 @@ sub create_view_userpics { my %keywords = (); while (my ($kw, $pic) = each %{$info->{kw}}) { LJ::text_out(\$kw); - push @{$keywords{$pic->{picid}}}, LJ::ehtml($kw); + push @{$keywords{$pic->{picid}}}, LJ::exml($kw); } my %comments = (); while (my ($pic, $comment) = each %{$info->{comment}}) { LJ::text_out(\$comment); - $comments{$pic} = LJ::ehtml($comment); + $comments{$pic} = LJ::strip_html($comment); } my %descriptions = (); while ( my( $pic, $description ) = each %{$info->{description}} ) { LJ::text_out(\$description); - $descriptions{$pic} = LJ::ehtml( $description ); + $descriptions{$pic} = LJ::strip_html($description); } my @pics; @@ -960,9 +960,8 @@ sub create_view_userpics { $entry_xml->getDocumentElement->appendChild( $content ); foreach my $kw (@{$keywords{$pic->{picid}}}) { - my $ekw = LJ::exml( $kw ); my $category = $entry_xml->createElement( 'category' ); - $category->setAttribute( 'term', $ekw ); + $category->setAttribute( 'term', $kw ); $category->setNamespace( $ns ); $entry_xml->getDocumentElement->appendChild( $category ); } --------------------------------------------------------------------------------