Make WordPress Core

Changeset 5743


Ignore:
Timestamp:
06/21/2007 10:01:21 PM (17 years ago)
Author:
markjaquith
Message:

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

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
    22 *  (c) 2005-2007 Sam Stephenson
    33 *
     
    88
    99var Prototype = {
    10   Version: '1.5.1',
     10  Version: '1.5.1.1',
    1111
    1212  Browser: {
     
    2525  },
    2626
    27   ScriptFragment: '<script[^>]*>([\\s\\S]*?)<\/script>',
    28   JSONFilter: /^\/\*-secure-\s*(.*)\s*\*\/\s*$/,
     27  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
     28  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
    2929
    3030  emptyFunction: function() { },
     
    365365  },
    366366
     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
    367372  evalJSON: function(sanitize) {
    368373    var json = this.unfilterJSON();
    369374    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 + ')');
    372376    } catch (e) { }
    373377    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
     
    12711275} else document.getElementsByClassName = function(className, parentElement) {
    12721276  var children = ($(parentElement) || document.body).getElementsByTagName('*');
    1273   var elements = [], child;
     1277  var elements = [], child, pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
    12741278  for (var i = 0, length = children.length; i < length; i++) {
    12751279    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))
    12771283      elements.push(Element.extend(child));
    12781284  }
  • trunk/wp-includes/script-loader.php

    r5700 r5743  
    3636        $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070528' );
    3737
    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');
    3939
    4040        $this->add( 'autosave', '/wp-includes/js/autosave.js', array('prototype', 'sack'), '20070306');
Note: See TracChangeset for help on using the changeset viewer.