PageSourceSearch

https://ombudsmanpunjab.gov.pk/misc/ui/jquery.ui.dialog-1.13.0-backport.js?v=1.10.2

js ombudsmanpunjab.gov.pk collected 2026-10-01 14:54:59 UTC 1,723 bytes, 58 lines download raw bytes

1/**
2 * Backport of security fixes from:
3 * https://bugs.jqueryui.com/ticket/6016
4 * https://github.com/jquery/jquery-ui/pull/1635/files
5 */
6
7(function ($) {
8
9  // Parts of this backport differ by jQuery version.
10  var versionParts = $.ui.dialog.version.split('.');
11  var majorVersion = parseInt(versionParts[0]);
12  var minorVersion = parseInt(versionParts[1]);
13
14  if (majorVersion === 1 && minorVersion < 13) {
15    var _originalSetOption = $.ui.dialog.prototype._setOption;
16    var _originalCreateTitlebar = $.ui.dialog.prototype._createTitlebar;
17
18    $.extend($.ui.dialog.prototype, {
19
20      _createTitlebar: function () {
21        if (this.options.closeText) {
22          this.options.closeText = Drupal.checkPlain(this.options.closeText);
23        }
24        _originalCreateTitlebar.apply(this, arguments);
25      },
26
27      _setOption: function (key, value) {
28        if (key === 'title' || key == 'closeText') {
29          if (value) {
30            value = Drupal.checkPlain(value);
31          }
32        }
33        _originalSetOption.apply(this, [key, value]);
34      }
35    });
36
37    if (majorVersion === 1 && minorVersion < 10) {
38      var _originalCreate = $.ui.dialog.prototype._create;
39
40      $.extend($.ui.dialog.prototype, {
41
42        _create: function () {
43          if (!this.options.title) {
44            var defaultTitle = this.element.attr('title');
45            // .attr() might return a DOMElement
46            if (typeof defaultTitle !== "string") {
47              defaultTitle = "";
48            }
49            this.options.title = defaultTitle;
50          }
51          this.options.title = Drupal.checkPlain(this.options.title);
52          _originalCreate.apply(this, arguments);
53        },
54      });
55    }
56  }
57
58})(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.