[kupu-checkins] r48634 - kupu/trunk/kupu/common
duncan at codespeak.net
duncan at codespeak.net
Tue Nov 13 10:26:38 CET 2007
Author: duncan
Date: Tue Nov 13 10:26:37 2007
New Revision: 48634
Modified:
kupu/trunk/kupu/common/kupucontentfilters.js
Log:
Preserve HTML comments when saving.
Modified: kupu/trunk/kupu/common/kupucontentfilters.js
==============================================================================
--- kupu/trunk/kupu/common/kupucontentfilters.js (original)
+++ kupu/trunk/kupu/common/kupucontentfilters.js Tue Nov 13 10:26:37 2007
@@ -312,7 +312,7 @@
this.misc = ['noscript'].concat(this.misc_inline);
this.inline = ['a'].concat(this.special, this.fontstyle, this.phrase, this.inline_forms);
- this.Inline = ['#text'].concat(this.inline, this.misc_inline);
+ this.Inline = ['#text', '#comment'].concat(this.inline, this.misc_inline);
this.heading = ['h1','h2','h3','h4','h5','h6'];
this.lists = ['ul','ol','dl','menu','dir'];
@@ -744,6 +744,8 @@
if (nostructure || permittedChildren['#text']) {
parentnode.appendChild(ownerdoc.createCDATASection(kid.nodeValue));
}
+ } else if (kid.nodeType == 8) {
+ parentnode.appendChild(ownerdoc.createComment(kid.nodeValue));
}
}
}
More information about the kupu-checkins
mailing list