init: function(editor) {
editor.addCommand( 'inlinesave', {
exec: function (editor) {
- var pagename = window.location.pathname.replace(/\.html$/, '').replace(/\/$/, '/index');
+ var pagename = window.location.pathname.replace(/\.php$/, '').replace(/\/$/, '/index');
var data = 'body='+encodeURIComponent(editor.getData());
ajaxpost = new XMLHttpRequest();
ajaxpost.open('POST', '/edit.php'+pagename, true);
if (!isset($_SERVER['PATH_INFO']) or strlen($_SERVER['PATH_INFO']) <= 1)
abort('409 input error', "geen bestand aangeleverd");
-$filename = preg_replace('/(?:\.html)?$/', '.html', ltrim($_SERVER['PATH_INFO'], '/'), 1);
+$filename = preg_replace('/(?:\.php)?$/', '.php', ltrim($_SERVER['PATH_INFO'], '/'), 1);
if (file_exists($filename) and !is_writable($filename))
abort('403 input error', "ongeldige bestandsnaam: $filename");
if (is_executable($filename))