Make HTML-ization in previews consistent with what will actually be
displayed.
Patch by kareila.
diffs (16 lines):
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?>', };
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog