Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r19039: LJSV-1501 (Incorrect encoding of 'suspen...

Committer: ailyin
LJSV-1501 (Incorrect encoding of 'suspended' warning)
U   trunk/cgi-bin/cleanhtml.pl
Modified: trunk/cgi-bin/cleanhtml.pl
===================================================================
--- trunk/cgi-bin/cleanhtml.pl	2011-05-10 02:30:14 UTC (rev 19038)
+++ trunk/cgi-bin/cleanhtml.pl	2011-05-10 04:01:19 UTC (rev 19039)
@@ -1378,6 +1378,9 @@
     $$data = $newdata;
     $$data .= $extra_text if $extra_text; # invalid markup error
 
+    # encode data back to utf8 before return
+    $$data = Encode::encode_utf8($$data);
+
     if ($suspend_msg) {
         my $msg = qq{<div style="color: #000; font: 12px Verdana, Arial, Sans-Serif; background-color: #ffeeee; background-repeat: repeat-x; border: 1px solid #ff9999; padding: 8px; margin: 5px auto; width: auto; text-align: left; background-image: url('$LJ::IMGPREFIX/message-error.gif');">};
         my $link_style = "color: #00c; text-decoration: underline; background: transparent; border: 0;";
@@ -1393,9 +1396,6 @@
         $$data = $msg . $$data;
     }
 
-    # encode data back to utf8 before return
-    $$data = Encode::encode_utf8($$data);
-
     return 0;
 }
 

Tags: andy, livejournal, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments