Changeset 5743
- Timestamp:
- 06/21/2007 10:01:21 PM (17 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/prototype.js
r5604 r5743 1 /* Prototype JavaScript framework, version 1.5.1 1 /* Prototype JavaScript framework, version 1.5.1.1 2 2 * (c) 2005-2007 Sam Stephenson 3 3 * … … 8 8 9 9 var Prototype = { 10 Version: '1.5.1 ',10 Version: '1.5.1.1', 11 11 12 12 Browser: { … … 25 25 }, 26 26 27 ScriptFragment: '<script[^>]*>([\\ s\\S]*?)<\/script>',28 JSONFilter: /^\/\*-secure- \s*(.*)\s*\*\/\s*$/,27 ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>', 28 JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, 29 29 30 30 emptyFunction: function() { }, … … 365 365 }, 366 366 367 isJSON: function() { 368 var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); 369 return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); 370 }, 371 367 372 evalJSON: function(sanitize) { 368 373 var json = this.unfilterJSON(); 369 374 try { 370 if (!sanitize || (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(json))) 371 return eval('(' + json + ')'); 375 if (!sanitize || json.isJSON()) return eval('(' + json + ')'); 372 376 } catch (e) { } 373 377 throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); … … 1271 1275 } else document.getElementsByClassName = function(className, parentElement) { 1272 1276 var children = ($(parentElement) || document.body).getElementsByTagName('*'); 1273 var elements = [], child ;1277 var elements = [], child, pattern = new RegExp("(^|\\s)" + className + "(\\s|$)"); 1274 1278 for (var i = 0, length = children.length; i < length; i++) { 1275 1279 child = children[i]; 1276 if (Element.hasClassName(child, className)) 1280 var elementClassName = child.className; 1281 if (elementClassName.length == 0) continue; 1282 if (elementClassName == className || elementClassName.match(pattern)) 1277 1283 elements.push(Element.extend(child)); 1278 1284 } -
trunk/wp-includes/script-loader.php
r5700 r5743 36 36 $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070528' ); 37 37 38 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.1 ');38 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.1.1'); 39 39 40 40 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('prototype', 'sack'), '20070306');
Note: See TracChangeset
for help on using the changeset viewer.