Upgrade to Prototype 1.5.1.1 (bugfix release). Props Nazgul. fixes #4502

git-svn-id: http://svn.automattic.com/wordpress/trunk@5743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-06-21 22:01:21 +00:00
parent 37dbcc2a80
commit eefdd4cef7
2 changed files with 15 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* Prototype JavaScript framework, version 1.5.1
/* Prototype JavaScript framework, version 1.5.1.1
* (c) 2005-2007 Sam Stephenson
*
* Prototype is freely distributable under the terms of an MIT-style license.
@ -7,7 +7,7 @@
/*--------------------------------------------------------------------------*/
var Prototype = {
Version: '1.5.1',
Version: '1.5.1.1',
Browser: {
IE: !!(window.attachEvent && !window.opera),
@ -24,8 +24,8 @@ var Prototype = {
document.createElement('form').__proto__)
},
ScriptFragment: '<script[^>]*>([\\s\\S]*?)<\/script>',
JSONFilter: /^\/\*-secure-\s*(.*)\s*\*\/\s*$/,
ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
emptyFunction: function() { },
K: function(x) { return x }
@ -364,11 +364,15 @@ Object.extend(String.prototype, {
return this.sub(filter || Prototype.JSONFilter, '#{1}');
},
isJSON: function() {
var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
},
evalJSON: function(sanitize) {
var json = this.unfilterJSON();
try {
if (!sanitize || (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json)))
return eval('(' + json + ')');
if (!sanitize || json.isJSON()) return eval('(' + json + ')');
} catch (e) { }
throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
},
@ -1270,10 +1274,12 @@ if (Prototype.BrowserFeatures.XPath) {
} else document.getElementsByClassName = function(className, parentElement) {
var children = ($(parentElement) || document.body).getElementsByTagName('*');
var elements = [], child;
var elements = [], child, pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
for (var i = 0, length = children.length; i < length; i++) {
child = children[i];
if (Element.hasClassName(child, className))
var elementClassName = child.className;
if (elementClassName.length == 0) continue;
if (elementClassName == className || elementClassName.match(pattern))
elements.push(Element.extend(child));
}
return elements;

View File

@ -35,7 +35,7 @@ class WP_Scripts {
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070528' );
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.1');
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.1.1');
$this->add( 'autosave', '/wp-includes/js/autosave.js', array('prototype', 'sack'), '20070306');
$this->localize( 'autosave', 'autosaveL10n', array(