diff --git a/lib/exe/js.php b/lib/exe/js.php index 3ed69b476b9afae5cd79c1480978bd18a57665fa..15cdc65066aff2953f82e9dec52bed433104c4be 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -39,6 +39,7 @@ function js_out(){ // Array of needed files $files = array( + DOKU_INC.'lib/scripts/helpers.js', DOKU_INC.'lib/scripts/events.js', DOKU_INC.'lib/scripts/cookie.js', DOKU_INC.'lib/scripts/script.js', diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js index c236eeb79f487a1148b64b3c703b6be62a98c67a..d7e6b3550e7f1d7e6c4a116844db0bae368b1b0c 100644 --- a/lib/scripts/cookie.js +++ b/lib/scripts/cookie.js @@ -29,6 +29,7 @@ DokuCookie = { //save the whole data array var text = ''; for(var key in DokuCookie.data){ + if (!DokuCookie.data.hasOwnProperty(key)) continue; text += '#'+escape(key)+'#'+DokuCookie.data[key]; } DokuCookie.setCookie(DokuCookie.name,text.substr(1),now,DOKU_BASE); diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index 077069a5ade708a3dac3657b80fe1ce8effd87c6..19e31e2ad0d44e2c08229b6b4d8584e721c6810f 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -57,6 +57,7 @@ function createPicker(id,list,icobase,edid){ picker.style.display = 'none'; for(var key in list){ + if (!list.hasOwnProperty(key)) continue; var btn = document.createElement('button'); btn.className = 'pickerbutton'; diff --git a/lib/scripts/events.js b/lib/scripts/events.js index 33bd1429eb5dd31ae915fe492c031b86b9c0959a..907526375a277ffe3f6c28f2a916089a14dbc718 100644 --- a/lib/scripts/events.js +++ b/lib/scripts/events.js @@ -40,6 +40,7 @@ function handleEvent(event) { var handlers = this.events[event.type]; // execute each event handler for (var i in handlers) { + if (!handlers.hasOwnProperty(i)) continue; this.$$handleEvent = handlers[i]; if (this.$$handleEvent(event) === false) { returnValue = false;