CKEditor and Newsboxes

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

CKEditor and Newsboxes

Post by cmb » Sat Feb 04, 2012 4:46 pm

Hello Community,

a bug was found regarding newsboxes that were edited by CKEditor, though it's not a bug in CKEditor. CKEditor formats the HTML in the following way:

Code: Select all

<h1>
        News01</h1>
And this causes a bug in CMSimple's core to trigger. A missing s modifier in newsbox() prohibits to remove the complete heading, but leaves the opening <h1>.

The solution is to change cmsimple/functions.php line 183 to:

Code: Select all

	    $body = preg_replace("/.*<\/h[1-".$cf['menu']['levels']."]>/isu", "", $c[$i]);
This will be fixed in CMSimple_XH 1.5.2, but I recommend to change the line for yourself, if you're using CKEditor with CMSimple_XH 1.5.1.

Christoph

PS: I've added an u modifier, which might be better anyway.

PPS: Fixed in SF trunk (rev. 153).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply