kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2011-11-09 04:04 am

[dw-free] English-strip cgi-bin/LJ/CleanHTML.pm

[commit: http://hg.dwscoalition.org/dw-free/rev/db3e6ad361a8]

http://bugs.dwscoalition.org/show_bug.cgi?id=1361

Fix t/cleaner-invalid.t to expect the updated error message.

Patch by [personal profile] kareila.

Files modified:
  • t/cleaner-invalid.t
--------------------------------------------------------------------------------
diff -r 280b068eb022 -r db3e6ad361a8 t/cleaner-invalid.t
--- a/t/cleaner-invalid.t	Mon Nov 07 19:37:25 2011 +0800
+++ b/t/cleaner-invalid.t	Tue Nov 08 22:06:08 2011 -0600
@@ -23,7 +23,7 @@
 $post = "<marquee><font size=\"24\"><color=\"FF0000\">blah blah";
 $clean->();
 is($clean_post,
-   qq {<marquee><font size="24"></font></marquee><div class='ljparseerror'>[<b>Error:</b> Irreparable invalid markup ('&lt;color=&quot;ff0000&quot;&gt;') in entry.  Owner must fix manually.  Raw contents below.]<br /><br /><div style="width: 95%; overflow: auto">} . LJ::ehtml($post) . "</div></div>",
+   qq {<marquee><font size="24"></font></marquee><div class='ljparseerror'>[<strong>Error:</strong> Irreparable invalid markup ('&lt;color=&quot;ff0000&quot;&gt;') in entry. Owner must fix manually. Raw contents below.]<br /><br /><div style="width: 95%; overflow: auto">} . LJ::ehtml($post) . "</div></div>",
    "Invalid HTML is not okay.");
 
 
@@ -38,7 +38,7 @@
     $post = "<lj user=\"" . $u->user . "\"> and some text <marquee><font size=\"24\"><color=\"FF0000\">blah blah";
     $clean->();
     is($clean_post,
-        $u->ljuser_display . qq { and some text <marquee><font size="24"></font></marquee><div class='ljparseerror'>[<b>Error:</b> Irreparable invalid markup ('&lt;color=&quot;ff0000&quot;&gt;') in entry.  Owner must fix manually.  Raw contents below.]<br /><br /><div style="width: 95%; overflow: auto">} . LJ::ehtml($post) . "</div></div>",
+        $u->ljuser_display . qq { and some text <marquee><font size="24"></font></marquee><div class='ljparseerror'>[<strong>Error:</strong> Irreparable invalid markup ('&lt;color=&quot;ff0000&quot;&gt;') in entry. Owner must fix manually. Raw contents below.]<br /><br /><div style="width: 95%; overflow: auto">} . LJ::ehtml($post) . "</div></div>",
         "Invalid markup with a user tag renders correctly.");
 }
 
--------------------------------------------------------------------------------