Committer: vtroitsky
OPSC-173: <lj-app> tag added. And lj user tag can be used in activities. U trunk/cgi-bin/cleanhtml.pl U trunk/htdocs/userinfo.bml
Modified: trunk/cgi-bin/cleanhtml.pl =================================================================== --- trunk/cgi-bin/cleanhtml.pl 2010-11-13 10:40:16 UTC (rev 17678) +++ trunk/cgi-bin/cleanhtml.pl 2010-11-13 12:26:24 UTC (rev 17679) @@ -9,6 +9,7 @@ LJ::EmbedModule LJ::Config LJ::Maps + LJ::UserApps ); LJ::Config->load; @@ -51,6 +52,7 @@ # 'keepcomments' => 1, # 'cuturl' => 'http://www.domain.com/full_item_view.ext', # 'ljcut_disable' => 1, # stops the cleaner from using the lj-cut tag +# 'ljapp_enable' => 1, # start using the lj-app tag # 'cleancss' => 1, # 'extractlinks' => 1, # remove a hrefs; implies noautolinks # 'noautolinks' => 1, # do not auto linkify @@ -132,6 +134,7 @@ my $undefined_tags = $opts->{undefined_tags} || ''; my $cut = $opts->{'cuturl'} || $opts->{'cutpreview'}; my $ljcut_disable = $opts->{'ljcut_disable'}; + my $ljapp_enable = 1 || $opts->{'ljapp_enable'}; my $s1var = $opts->{'s1var'}; my $extractlinks = 0 || $opts->{'extractlinks'}; my $noautolinks = $extractlinks || $opts->{'noautolinks'}; @@ -534,6 +537,13 @@ $newdata .= "\n<style>\n$style</style>\n"; next; } + elsif ($tag eq "lj-app") + { + next TOKEN unless $ljapp_enable; + + $newdata .= LJ::UserApps->expand_ljapp_tag($attr); + next TOKEN; + } elsif ($tag eq "lj") { # keep <lj comm> working for backwards compatibility, but pretend Modified: trunk/htdocs/userinfo.bml =================================================================== --- trunk/htdocs/userinfo.bml 2010-11-13 10:40:16 UTC (rev 17678) +++ trunk/htdocs/userinfo.bml 2010-11-13 12:26:24 UTC (rev 17679) @@ -1553,6 +1553,8 @@ if ($result->{status} eq 'OK') { foreach (@{$result->{activities}}) { my $app = LJ::UserApps->get_application( id => $_->{application_id} ); + LJ::CleanHTML::clean_subject(\$_->{title}); + LJ::CleanHTML::clean_event(\$_->{body}, {}); push @activities, { app_name => $app->name, app_href => $app->href,