bugfix
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Sep 2011 14:47:11 +0000 (16:47 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Sep 2011 14:47:11 +0000 (16:47 +0200)
redakcja/static/js/wiki/xslt.js

index ff36666..1327fc6 100644 (file)
@@ -253,7 +253,7 @@ HTMLSerializer.prototype.serialize = function(rootElement, stripOuter)
                                break;
                        case TEXT_NODE:
                                self.result += text_buffer;
-                               text_buffer = token.node.nodeValue.replace('&', '&amp;').replace('<', '&lt;');
+                               text_buffer = token.node.nodeValue.replace(/&/g, '&amp;').replace(/</g, '&lt;');
                                break;
             case COMMENT_NODE:
                 self.result += text_buffer;