Spurious Code in Templates after Editing online

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
Posts: 13260
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE

Spurious Code in Templates after Editing online

Post by cmb » Tue Apr 30, 2013 9:09 am

Hello Community,

in CMSimple_XH 1.5.4 the variable $bjs was introduced, which is used by several plugins. If one of these plugins is installed, this may lead to spurious code that is being inserted at the bottom of the template, when it is edited online.

So, if you have edited your template online, check your template for such code that doesn't belong there and remove it.

The issue will be fixed in XH 1.5.7[1]. For now you can use the following quick fix: change line 374 in cmsimple/adm.php <INS>(save the file afterwards as UTF-8 without BOM)</INS> from

Code: Select all

                    $o .= '<textarea rows="25" cols="50" name="text" class="cmsimplecore_file_edit">' . rf($pth['file'][$file]) . '</textarea>';

Code: Select all

                    $o .= '<textarea rows="25" cols="50" name="text" class="cmsimplecore_file_edit">' . htmlspecialchars(rf($pth['file'][$file]), ENT_COMPAT, 'UTF-8') . '</textarea>';
Sorry for the inconvenience.


PS: [1] CMSimple_XH 1.5.7 is now available.
Last edited by cmb on Wed May 01, 2013 12:48 pm, edited 3 times in total.
Reason: added info about UTF-8 without BOM; added PS
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply