[dw-free] Previews for non-dreamwidth commenters
[commit: http://hg.dwscoalition.org/dw-free/rev/9ee5d437d2f0]
http://bugs.dwscoalition.org/show_bug.cgi?id=2748
Make HTML-ization in previews consistent with what will actually be
displayed.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2748
Make HTML-ization in previews consistent with what will actually be
displayed.
Patch by
Files modified:
- cgi-bin/LJ/Talk.pm
--------------------------------------------------------------------------------
diff -r 92e96536bf99 -r 9ee5d437d2f0 cgi-bin/LJ/Talk.pm
--- a/cgi-bin/LJ/Talk.pm Mon Aug 23 11:07:49 2010 +0800
+++ b/cgi-bin/LJ/Talk.pm Mon Aug 23 11:10:12 2010 +0800
@@ -3632,7 +3632,11 @@ sub make_preview {
my $spellcheck_html;
# clean first; if the cleaner finds it invalid, don't spellcheck, so that we
# can show the user the error.
- my $cleanok = LJ::CleanHTML::clean_comment(\$event, $form->{'prop_opt_preformatted'});
+ my $remote = LJ::get_remote();
+ my $u = LJ::load_user( $form->{journal} );
+ my $cleanok = LJ::CleanHTML::clean_comment( \$event,
+ { anon_comment => LJ::Talk::treat_as_anon( $remote, $u ),
+ preformatted => $form->{prop_opt_preformatted} } );
if (defined($cleanok) && $LJ::SPELLER && $form->{'do_spellcheck'}) {
my $s = new LJ::SpellCheck { 'spellcommand' => $LJ::SPELLER,
'color' => '<?hotcolor?>', };
--------------------------------------------------------------------------------
