[dw-free] extra space in user tag
[commit: http://hg.dwscoalition.org/dw-free/rev/fb5f6c21cfba]
http://bugs.dwscoalition.org/show_bug.cgi?id=3778
Refactor so we don't have extra spaces here.
Patch by
ninetydegrees.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3778
Refactor so we don't have extra spaces here.
Patch by
Files modified:
- cgi-bin/DW/External/User.pm
- cgi-bin/LJ/User.pm
--------------------------------------------------------------------------------
diff -r 53915645ef71 -r fb5f6c21cfba cgi-bin/DW/External/User.pm
--- a/cgi-bin/DW/External/User.pm Tue Aug 02 18:20:33 2011 +0800
+++ b/cgi-bin/DW/External/User.pm Tue Aug 02 18:29:21 2011 +0800
@@ -67,10 +67,10 @@
my $profile_url = $self->site->profile_url( $self );
my $journal_url = $self->site->journal_url( $self );
my $badge_image_url = $self->site->badge_image_url( $self );
- my $display_class = $opts{no_ljuser_class} ? "" : "class='ljuser'";
+ my $display_class = $opts{no_ljuser_class} ? "" : " class='ljuser'";
my $domain = $self->site->{domain} ? $self->site->{domain} : $self->site->{hostname};
- return "<span $display_class style='white-space: nowrap;'><a href='$profile_url'>" .
+ return "<span style='white-space: nowrap;'$display_class><a href='$profile_url'>" .
"<img src='$badge_image_url' alt='[$domain profile] ' style='vertical-align: bottom; border: 0; padding-right: 1px;' />" .
"</a><a href='$journal_url'><b>$user</b></a></span>";
}
diff -r 53915645ef71 -r fb5f6c21cfba cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm Tue Aug 02 18:20:33 2011 +0800
+++ b/cgi-bin/LJ/User.pm Tue Aug 02 18:29:21 2011 +0800
@@ -3242,7 +3242,7 @@
my $strike = $opts->{del} ? ' text-decoration: line-through;' : '';
my $profile_url = $opts->{profile_url} || '';
my $journal_url = $opts->{journal_url} || '';
- my $display_class = $opts->{no_ljuser_class} ? "" : "class='ljuser'";
+ my $display_class = $opts->{no_ljuser_class} ? "" : " class='ljuser'";
my $type = $u->journaltype_readable;
my ($url, $name);
@@ -3276,7 +3276,7 @@
my $profile = $profile_url ne '' ? $profile_url :
"$LJ::SITEROOT/profile?userid=" . $u->userid . "&t=I$andfull";
- return "<span $display_class lj:user='$name' style='white-space: nowrap;$strike'><a href='$profile'>" .
+ return "<span lj:user='$name' style='white-space: nowrap;$strike'$display_class><a href='$profile'>" .
"<img src='$imgurl' alt='[$type profile] ' width='$width' height='$height'" .
" style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
"<a href='$url' rel='nofollow'><b>$name</b></a></span>";
@@ -8188,7 +8188,7 @@
my $img = $opts->{'imgroot'} || $LJ::IMGPREFIX;
my $profile_url = $opts->{'profile_url'} || '';
my $journal_url = $opts->{'journal_url'} || '';
- my $display_class = $opts->{no_ljuser_class} ? "" : "class='ljuser'";
+ my $display_class = $opts->{no_ljuser_class} ? "" : " class='ljuser'";
my $profile;
my $make_tag = sub {
@@ -8211,7 +8211,7 @@
$profile = $profile_url ne '' ? $profile_url : $profile . $andfull;
$url = $journal_url ne '' ? $journal_url : $url;
- return "<span $display_class lj:user='$user' style='white-space: nowrap;$strike'>" .
+ return "<span lj:user='$user' style='white-space: nowrap;$strike'$display_class>" .
"<a href='$profile'><img src='$img/$fil' alt='[$alttext] ' width='$x' height='$y'" .
" style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /></a>" .
"<a href='$url'$link_color>$ljusername</a></span>";
--------------------------------------------------------------------------------
