Opened 9 years ago

Last modified 8 years ago

#12876 confirmed Bug

Required "type" attribute is missing in the <style> element generated by the editor

Reported by: Jan Pechanec Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: IBM Cc:

Description

Type is required attribute of <style> tag according to http://www.w3.org/TR/html401/present/styles.html#style-group

But CKEDITOR generates following

<style>.cke{visibility:hidden;}</style>

There shall be simple fix - add attribute " type='text/css' " to generated <style> tag. We tried to fix downloaded source code by adding one line into document.js:

  var style = new CKEDITOR.dom.element( 'style', this );
  style.setAttribute('type','text/css'); //added by us
  style.append( new CKEDITOR.dom.text( cssStyleText, this ) );

But it seems it does not work in Internet Explorer 11.

It is causing problems with formal validation of HTML code in IBM internal application.

Change History (3)

comment:1 Changed 9 years ago by Jan Pechanec

Summary: required TYPE attribute is missing in <script>required TYPE attribute is missing in <style>

comment:2 Changed 9 years ago by Jakub Ś

Keywords: IBM added; style html removed
Status: newconfirmed
Version: 4.4.74.0

Since this attribute is required in HTML 4 and optional but valid in HTML 5 there is no problem in adding this attribute. We will keep backward compatibility and won't break anything.

comment:3 Changed 8 years ago by Anna Tomanek

Summary: required TYPE attribute is missing in <style>Required "type" attribute is missing in the <style> element generated by the editor
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