Opened 12 years ago

Closed 12 years ago

#8804 closed Bug (invalid)

Disable HTML correction

Reported by: MJ21071954 Owned by:
Priority: Normal Milestone:
Component: Core : Parser Version: 3.6.2
Keywords: Cc:


Hello. I am using CKEditor module on a website powered by Drupal 6.

Some of the pages on the website have invalid (x)HTML, mainly block elements inside inline elements. Before anyone edits the page, the content is rendered live on the website as it should appear.

However when an admin goes to edit the page and the editable content appears in WYSIWYG view of CKEditor, it attempts to 'fix' the invalid code successfully.

All HTML correction options are unticked in Drupal and CKEditor configuration using Drupal's admin. So, is this a bug?

My question is simply how to prevent CKEditor from re-writing the code in WYSIWYG view?

Here is example code: Should be / what I need:

<a class="link-block" href="index.html"><h2>My Header</h2><p>Some text.</p></a>

Result after switching to WYSIWYG view:

<h2><a class="link-block" href="index.html">My Header</a></h2><p><a class="link-block" href="index.html">Some text.</a></p>

Browsers: Firefox, Safari, Chrome CKEditor version: 3.6.2 :: 6.x-1.8 (Demo, Drupal module) Drupal version 6.17 - PHP version 5.3.2-1ubuntu4.9

Change History (1)

comment:1 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

This is how CKEditor works by default and it can't be ommited.

Furthermore If you are using HTML4 and don't use any CKEditor logic than such code gets corrected by browser itself (because it is invalid) - you don't see it but that is what happens.

<h2><a class="link-block" href="index.html">My Header</a></h2><p><a class="link-block" href="index.html">Some text.</a></p> 

This is how this code should look in HTML4.

As for HTML5 we have this ticket already and plan to implement this in the future.

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