Skip to content

Commit

Permalink
Merge branch 't/11544'
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewand committed Mar 13, 2014
2 parents 68a315d + 8c7d5e1 commit 8b8b2af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#11544](http://dev.ckeditor.com/ticket/11544): Placeholders will no longer be upcasted in parents not accepting spans.
* [#8663](http://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-renameNode) not clearing [`element.getName()`](http://docs.ckeditor.com/#!/api/CKEDITOR.dom.element-method-getName) cache.
* [#11574](http://dev.ckeditor.com/ticket/11574): Fixed *Backspace* destroying DOM structure if inline editable is placed in list item.

Expand Down
4 changes: 2 additions & 2 deletions core/htmlparser/filter.js
Expand Up @@ -176,8 +176,8 @@
return this.attributeNameRules.execOnName( context, name );
},

onText: function( context, text ) {
return this.textRules.exec( context, text );
onText: function( context, text, node ) {
return this.textRules.exec( context, text, node );
},

onComment: function( context, commentText, comment ) {
Expand Down
9 changes: 8 additions & 1 deletion plugins/placeholder/plugin.js
Expand Up @@ -65,7 +65,14 @@
var placeholderReplaceRegex = /\[\[([^\[\]])+\]\]/g;

editor.dataProcessor.dataFilter.addRules( {
text: function( text ) {
text: function( text, node ) {
var dtd = node.parent && CKEDITOR.dtd[ node.parent.name ];

// Skip the case when placeholder is in elements like <title> or <textarea>
// but upcast placeholder in custom elements (no DTD).
if ( dtd && !dtd.span )
return;

return text.replace( placeholderReplaceRegex, function( match ) {
// Creating widget code.
var widgetWrapper = null,
Expand Down

0 comments on commit 8b8b2af

Please sign in to comment.