Last JS fixes, especially for IE 6, 7 and 8.

This commit is contained in:
Janek Bevendorff 2012-08-12 19:59:34 +02:00 committed by Janek Bevendorff
parent 4406b28884
commit 1195aa88bf
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@
document.addEventListener('load', eventHandler, true);
} else if (window.attachEvent) {
// Internet Exploder
window.attachEvent('load', eventHandler);
window.attachEvent('onload', eventHandler);
} else {
// Very, very old browsers
var oldOnload = typeof window.onload == 'function' ? window.onload : null;
@ -51,9 +51,9 @@
}
this.hideBeeElement = function() {
var elementClass = divCaptcha.getAttribute('class');
var elementClass = divCaptcha.className;
if (null === elementClass.match(/\bspambeehidden\b/)) {
divCaptcha.setAttribute('class', elementClass + ' spambeehidden');
divCaptcha.className = elementClass + ' spambeehidden';
}
}

View file

@ -612,7 +612,7 @@ class serendipity_event_spamblock_bee extends serendipity_event
echo "'url': '" . $serendipity['baseURL'] . "index.php/plugin/spamblockbeecaptcha', " .
"'method': 'json'";
} else {
echo "'answer': " . (is_numeric($answer) ? $answer : "'" . trim($answer) . "'") . ', ' .
echo "'answer': " . (is_numeric($answer) ? $answer : "'" . trim(addcslashes($answer, '\\"\'')) . "'") . ', ' .
"'method': 'default'";
}