Fix display of <br /> in comment preview with spellcheck. (Will show up 
as line breaks, not as escaped HTML tags)

        Patch by afuna. 

diffs (12 lines):

diff -r c2a33a479a66 -r cae657bb4c2e cgi-bin/talklib.pl
--- a/cgi-bin/talklib.pl        Tue Jun 30 13:50:28 2009 +0000
+++ b/cgi-bin/talklib.pl        Tue Jun 30 13:57:14 2009 +0000
@@ -3499,6 +3499,8 @@ sub make_preview {
         my $s = new LJ::SpellCheck { 'spellcommand' => $LJ::SPELLER,
                                      'color' => '<?hotcolor?>', };
         $spellcheck_html = $s->check_html(\$event);
+        # unescape the <br />s for readability. All other HTML remains 
untouched.
+        $spellcheck_html =~ s/&lt;br \/&gt;/<br \/>/g;
     }
 
     $ret .= "$BML::ML{'/talkpost_do.bml.preview.subject'} " . 
LJ::ehtml($cleansubject) . "<hr />\n";
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to