Skip to content

Commit

Permalink
Don't remove empty anchor tags in CKEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
rust-lucas committed Nov 5, 2018
1 parent 6e28fae commit 00dfed2
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ CKEDITOR.htmlParser.fragment = function() {
if ( node.attributes[ 'data-cke-survive' ] )
return false;

// Empty link is to be removed when empty but not anchor. (https://dev.ckeditor.com/ticket/7894)
return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ];
// Empty link is to be removed when empty but not anchor. (http://dev.ckeditor.com/ticket/7894)

if(node.name == 'a'){
return false;
}

return CKEDITOR.dtd.$removeEmpty[ node.name ];
}

/**
Expand Down

0 comments on commit 00dfed2

Please sign in to comment.