2010-06-10, 10:05:30
I have looked at the code and managed to fix the behavior for me, it comprised of following 2 steps:
Replacing htmlentities with htmlspecialchars when saving the page - in admin/changedata.php
Setting the ckeditor to not encode diacritics as entities:
- to admin/template/js/ckeditor/config.js add
A patch for actual SVN version is here:
Replacing htmlentities with htmlspecialchars when saving the page - in admin/changedata.php
Setting the ckeditor to not encode diacritics as entities:
- to admin/template/js/ckeditor/config.js add
Code:
config.entities = false;
config.entities_greek = false;
config.entities_latin = false;
config.entities_processNumerical = false;
A patch for actual SVN version is here:
Code:
Index: admin/changedata.php
===================================================================
--- admin/changedata.php (revision 9)
+++ admin/changedata.php (working copy)
@@ -86,15 +86,15 @@
$file = GSDATAPAGESPATH . $url .".xml";
// format and clean the responses
- if(isset($_POST['post-title'])) { $title = htmlentities($_POST['post-title'], ENT_QUOTES, 'UTF-8'); }
- if(isset($_POST['post-metak'])) { $metak = htmlentities($_POST['post-metak'], ENT_QUOTES, 'UTF-8'); }
- if(isset($_POST['post-metad'])) { $metad = htmlentities($_POST['post-metad'], ENT_QUOTES, 'UTF-8'); }
+ if(isset($_POST['post-title'])) { $title = htmlspecialchars($_POST['post-title'], ENT_QUOTES, 'UTF-8'); }
+ if(isset($_POST['post-metak'])) { $metak = htmlspecialchars($_POST['post-metak'], ENT_QUOTES, 'UTF-8'); }
+ if(isset($_POST['post-metad'])) { $metad = htmlspecialchars($_POST['post-metad'], ENT_QUOTES, 'UTF-8'); }
if(isset($_POST['post-template'])) { $template = $_POST['post-template']; }
if(isset($_POST['post-parent'])) { $parent = $_POST['post-parent']; }
- if(isset($_POST['post-menu'])) { $menu = htmlentities($_POST['post-menu'], ENT_QUOTES, 'UTF-8'); }
+ if(isset($_POST['post-menu'])) { $menu = htmlspecialchars($_POST['post-menu'], ENT_QUOTES, 'UTF-8'); }
if(isset($_POST['post-menu-enable'])) { $menuStatus = "Y"; } else { $menuStatus = ""; }
if(isset($_POST['post-private'])) { $private = "Y"; } else { $private = ""; }
- if(isset($_POST['post-content'])) { $content = htmlentities($_POST['post-content'], ENT_QUOTES, 'UTF-8'); }
+ if(isset($_POST['post-content'])) { $content = htmlspecialchars($_POST['post-content'], ENT_QUOTES, 'UTF-8'); }
if(isset($_POST['post-menu-order']))
{
Index: admin/template/js/ckeditor/config.js
===================================================================
--- admin/template/js/ckeditor/config.js (revision 9)
+++ admin/template/js/ckeditor/config.js (working copy)
@@ -8,4 +8,8 @@
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
+ config.entities = false;
+ config.entities_greek = false;
+ config.entities_latin = false;
+ config.entities_processNumerical = false;
};