Opened 8 years ago

Closed 8 years ago

#14913 closed Bug (invalid)

Tags are stripped even with "Full HTML" (i.e. without ACF)

Reported by: Tade0 Owned by: Tade0
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Steps to reproduce

  1. Create an editor instance with config option allowedContent set to true.
  2. Switch to source mode, paste the following content:
    <div class="socials">
    <p>Volg ons</p>
    <ul class="social-list">
    	<li><a target="_blank" href="https://www.twitter.com/" title="Twitter"><i class="fa fa-twitter"></i></a></li>
    	<li><a target="_blank" href="https://www.facebook.com/" title="Facebook"><i class="fa fa-facebook"></i></a></li>
    </ul>
    </div>
    
  1. Switch to WYSIWYG mode and back.

Expected result

No modifications done to the data.

Actual result

Data is now as follows:

<div class="socials">
<p>Volg ons</p>

<ul class="social-list">
	<li>&nbsp;</li>
	<li>&nbsp;</li>
</ul>
</div>

Other details (browser, OS, CKEditor version, installed plugins)

If you put some text in the bullet points they are preserved, which means only empty inline tags are stripped - this may in fact be a feature rather than a bug.

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

I understand this is being done for performance reasons but this semantically isn't correct. To get results you want, you need to make changes in dtd. Another important thing are corestyles which work with i tag.

CKEDITOR.dtd.$removeEmpty['i'] = false;
var editor = CKEDITOR.replace( 'editor1', {				
	allowedContent : true,
	coreStyles_italic : { element: 'i', overrides: 'em' },
	extraAllowedContent : 'i(*);ul(*);div(*)'
});
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy