Upgrade jquery-migrate to 1.2.1

This commit is contained in:
Morris Jobke 2015-06-09 09:14:42 +02:00
parent 75bd040f1c
commit 7b7b21d328
8 changed files with 545 additions and 516 deletions

View File

@ -17,6 +17,7 @@
"handlebars": "~1.3.0",
"jcrop": "~0.9.12",
"jquery": "~1.10.0",
"jquery-migrate": "~1.2.1",
"jquery-ui": "1.10.0",
"jsTimezoneDetect": "~1.0.5",
"moment": "~2.8.3",

View File

@ -1,7 +1,7 @@
{
"vendor": [
"jquery/jquery.min.js",
"jquery/jquery-migrate.min.js",
"jquery-migrate/jquery-migrate.min.js",
"jquery-ui/ui/jquery-ui.custom.js",
"underscore/underscore.js",
"moment/min/moment-with-locales.js",

View File

@ -35,7 +35,7 @@ moment/scripts
# jquery
jquery/**
!jquery/.bower.json
!jquery/jquery*
!jquery/jquery.*
!jquery/MIT-LICENSE.txt
# jquery-ui

15
core/vendor/jquery-migrate/.bower.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"name": "jquery-migrate",
"version": "1.2.1",
"homepage": "https://github.com/appleboy/jquery-migrate",
"_release": "1.2.1",
"_resolution": {
"type": "version",
"tag": "1.2.1",
"commit": "65f37b60ae3d305efbe1e85909e14c60d524d12a"
},
"_source": "git://github.com/appleboy/jquery-migrate.git",
"_target": "~1.2.1",
"_originalSource": "jquery-migrate",
"_direct": true
}

View File

@ -0,0 +1,4 @@
{
"name" : "jquery-migrate",
"version" : "1.2.1"
}

View File

@ -1,5 +1,5 @@
/*!
* jQuery Migrate - v1.1.1 - 2013-02-16
* jQuery Migrate - v1.2.1 - 2013-05-08
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
@ -17,8 +17,8 @@ jQuery.migrateWarnings = [];
// jQuery.migrateMute = false;
// Show a message on the console so devs know we're active
if ( !jQuery.migrateMute && window.console && console.log ) {
console.log("JQMIGRATE: Logging is active");
if ( !jQuery.migrateMute && window.console && window.console.log ) {
window.console.log("JQMIGRATE: Logging is active");
}
// Set to false to disable traces that appear with warnings
@ -33,10 +33,11 @@ jQuery.migrateReset = function() {
};
function migrateWarn( msg) {
var console = window.console;
if ( !warnedAbout[ msg ] ) {
warnedAbout[ msg ] = true;
jQuery.migrateWarnings.push( msg );
if ( window.console && console.warn && !jQuery.migrateMute ) {
if ( console && console.warn && !jQuery.migrateMute ) {
console.warn( "JQMIGRATE: " + msg );
if ( jQuery.migrateTrace && console.trace ) {
console.trace();
@ -189,26 +190,35 @@ jQuery.attrHooks.value = {
var matched, browser,
oldInit = jQuery.fn.init,
oldParseJSON = jQuery.parseJSON,
// Note this does NOT include the #9521 XSS fix from 1.7!
rquickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*|#([\w\-]*))$/;
// Note: XSS check is done below after string is trimmed
rquickExpr = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
// $(html) "looks like html" rule change
jQuery.fn.init = function( selector, context, rootjQuery ) {
var match;
if ( selector && typeof selector === "string" && !jQuery.isPlainObject( context ) &&
(match = rquickExpr.exec( selector )) && match[1] ) {
(match = rquickExpr.exec( jQuery.trim( selector ) )) && match[ 0 ] ) {
// This is an HTML string according to the "old" rules; is it still?
if ( selector.charAt( 0 ) !== "<" ) {
migrateWarn("$(html) HTML strings must start with '<' character");
}
if ( match[ 3 ] ) {
migrateWarn("$(html) HTML text after last tag is ignored");
}
// Consistently reject any HTML-like string starting with a hash (#9521)
// Note that this may break jQuery 1.6.x code that otherwise would work.
if ( match[ 0 ].charAt( 0 ) === "#" ) {
migrateWarn("HTML string cannot start with a '#' character");
jQuery.error("JQMIGRATE: Invalid selector string (XSS)");
}
// Now process using loose rules; let pre-1.8 play too
if ( context && context.context ) {
// jQuery object as context; parseHTML expects a DOM object
context = context.context;
}
if ( jQuery.parseHTML ) {
return oldInit.call( this, jQuery.parseHTML( jQuery.trim(selector), context, true ),
return oldInit.call( this, jQuery.parseHTML( match[ 2 ], context, true ),
context, rootjQuery );
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long