Fixed broken error messages in Firefox. Fixes #373
authorŁukasz Rekucki <lrekucki@gmail.com>
Mon, 8 Mar 2010 12:39:44 +0000 (13:39 +0100)
committerŁukasz Rekucki <lrekucki@gmail.com>
Mon, 8 Mar 2010 12:39:44 +0000 (13:39 +0100)
platforma/static/js/main.js

index 8aff731..c7e0af8 100644 (file)
@@ -301,7 +301,11 @@ function transform(editor, callback) {
                     callback();
                 }
             }, error: function(text) {
                     callback();
                 }
             }, error: function(text) {
-                $('#html-view').html('<p class="error">Wystąpił błąd:</p><pre>' + text + '</pre>');
+                               var message = $('<pre></pre>');
+                               message.text(text);
+                $('#html-view').html('<p class="error">Wystąpił błąd:</p><pre>' + 
+                                   message.html() + '</pre>');
+                                       
                 $.unblockUI();
                 if (callback) {
                     callback();
                 $.unblockUI();
                 if (callback) {
                     callback();