1/** 2 * Backport of security fix from: 3 * https://github.com/jquery/jquery-ui/pull/1955/files 4 */ 5 6(function ($) { 7 8 // No backport is needed if we're already on jQuery UI 1.13 or higher. 9 var versionParts = $.ui.version.split('.'); 10 var majorVersion = parseInt(versionParts[0]); 11 var minorVersion = parseInt(versionParts[1]); 12 if ( (majorVersion > 1) || (majorVersion === 1 && minorVersion >= 13) ) { 13 return; 14 } 15 16 var fnOriginalPosition = $.fn.position; 17 $.fn.extend({ 18 'position': function (options) { 19 if (typeof options === 'undefined') { 20 return fnOriginalPosition.call(this); 21 } 22 23 // Make sure string options are treated as CSS selectors 24 var target = typeof options.of === "string" ? 25 $(document).find(options.of) : 26 $(options.of); 27 28 options.of = (target[0] === undefined) ? null : target; 29 return fnOriginalPosition.call(this, options); 30 } 31 }); 32 33})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.