Local changes.
[redakcja.git] / 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;