[Libreoffice-commits] online.git: loleaflet/js loleaflet/Makefile.am loleaflet/package.json

2020-06-01 Thread gokaysatir (via logerrit)
 loleaflet/Makefile.am   |2 
 loleaflet/js/select2.js | 2760 ++--
 loleaflet/package.json  |2 
 3 files changed, 2007 insertions(+), 757 deletions(-)

New commits:
commit d478b2d030cee45ba52be4842b0d8b1bf3344af3
Author: gokaysatir 
AuthorDate: Mon Jun 1 10:27:28 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Jun 1 15:30:30 2020 +0200

update select2 package.

Change-Id: I8ff53d838e80011f110bd427e26adcd372d9a2fb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95217
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 1e51e4156..3f68dcf12 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -100,7 +100,7 @@ LOLEAFLET_ADMIN_JS =\
 NODE_MODULES_SRC =\
autolinker@3.14.1 \
json-js@1.1.2 \
-   select2@4.0.1 \
+   select2@4.0.13 \
vex-js@4.1.0 \
l10n-for-node@0.0.1 \
@braintree/sanitize-url@4.0.1
diff --git a/loleaflet/js/select2.js b/loleaflet/js/select2.js
index 61e08e00b..e6631ae31 100644
--- a/loleaflet/js/select2.js
+++ b/loleaflet/js/select2.js
@@ -1,470 +1,488 @@
 /*!
- * Select2 4.0.1
+ * Select2 4.0.13
  * https://select2.github.io
  *
  * Released under the MIT license
  * https://github.com/select2/select2/blob/master/LICENSE.md
  */
-(function (factory) {
+;(function (factory) {
   if (typeof define === 'function' && define.amd) {
 // AMD. Register as an anonymous module.
 define(['jquery'], factory);
-  } else if (typeof exports === 'object') {
+  } else if (typeof module === 'object' && module.exports) {
 // Node/CommonJS
-factory(require('jquery'));
+module.exports = function (root, jQuery) {
+  if (jQuery === undefined) {
+// require('jQuery') returns a factory that requires window to
+// build a jQuery instance, we normalize how we use modules
+// that require this pattern but the window provided is a noop
+// if it's defined (how jquery works)
+if (typeof window !== 'undefined') {
+  jQuery = require('jquery');
+}
+else {
+  jQuery = require('jquery')(root);
+}
+  }
+  factory(jQuery);
+  return jQuery;
+};
   } else {
 // Browser globals
 factory(jQuery);
   }
-}(function (jQuery) {
+} (function (jQuery) {
   // This is needed so we can catch the AMD loader configuration and use it
   // The inner file should be wrapped (by `banner.start.js`) in a function that
   // returns the AMD loader references.
-  var S2 =
-(function () {
+  var S2 =(function () {
   // Restore the Select2 AMD loader so it can be used
   // Needed mostly in the language files, where the loader is not inserted
   if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {
 var S2 = jQuery.fn.select2.amd;
   }
-var S2;(function () { if (!S2 || !S2.requirejs) {
-if (!S2) { S2 = {}; } else { require = S2; }
-/**
- * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All 
Rights Reserved.
- * Available via the MIT or new BSD license.
- * see: http://github.com/jrburke/almond for details
- */
-//Going sloppy to avoid 'use strict' string cost, but strict practices should
-//be followed.
-/*jslint sloppy: true */
-/*global setTimeout: false */
-
-var requirejs, require, define;
-(function (undef) {
-var main, req, makeMap, handlers,
-defined = {},
-waiting = {},
-config = {},
-defining = {},
-hasOwn = Object.prototype.hasOwnProperty,
-aps = [].slice,
-jsSuffixRegExp = /\.js$/;
-
-function hasProp(obj, prop) {
-return hasOwn.call(obj, prop);
-}
-
-/**
- * Given a relative module name, like ./something, normalize it to
- * a real name that can be mapped to a path.
- * @param {String} name the relative name
- * @param {String} baseName a real name that the name arg is relative
- * to.
- * @returns {String} normalized name
- */
-function normalize(name, baseName) {
-var nameParts, nameSegment, mapValue, foundMap, lastIndex,
-foundI, foundStarMap, starI, i, j, part,
-baseParts = baseName && baseName.split("/"),
-map = config.map,
-starMap = (map && map['*']) || {};
-
-//Adjust any relative paths.
-if (name && name.charAt(0) === ".") {
-//If have a base name, try to normalize against it,
-//otherwise, assume it is a top-level require that will
-//be relative to baseUrl in the end.
-if (baseName) {
-name = name.split('/');
-lastIndex = name.length - 1;
-
-// Node .js allowance:
-if (config.nodeIdCompat && 
jsSuffixRegExp.test(name[lastIndex])) {
-name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, 
'');
-  

[Libreoffice-commits] online.git: loleaflet/js loleaflet/Makefile.am loleaflet/package.json

2020-05-29 Thread gokaysatir (via logerrit)
 loleaflet/Makefile.am  |2 
 loleaflet/js/Autolinker.js | 8455 ++---
 loleaflet/package.json |2 
 3 files changed, 4279 insertions(+), 4180 deletions(-)

New commits:
commit 880868ca6c2630c730f0c003c2078c1eae42c31b
Author: gokaysatir 
AuthorDate: Fri May 29 22:52:50 2020 +0300
Commit: Henry Castro 
CommitDate: Fri May 29 22:13:20 2020 +0200

update autolinker package.

Change-Id: I53c642763212d958fb0a860fcfbd8f4bbe7b37ff
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95166
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index d4126763f..2e43e2df6 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -97,7 +97,7 @@ LOLEAFLET_ADMIN_JS =\
admin/src/AdminSocketHistory.js
 
 NODE_MODULES_SRC =\
-   autolinker@1.4.3 \
+   autolinker@3.14.1 \
json-js@1.1.2 \
select2@4.0.1 \
vex-js@4.1.0 \
diff --git a/loleaflet/js/Autolinker.js b/loleaflet/js/Autolinker.js
index d463c331a..fe7680d03 100644
--- a/loleaflet/js/Autolinker.js
+++ b/loleaflet/js/Autolinker.js
@@ -1,4187 +1,4286 @@
 /*!
  * Autolinker.js
- * 1.4.3
+ * 3.14.1
  *
- * Copyright(c) 2017 Gregory Jacobs 
+ * Copyright(c) 2020 Gregory Jacobs 
  * MIT License
  *
  * https://github.com/gregjacobs/Autolinker.js
  */
-;(function(root, factory) {
-  if (typeof define === 'function' && define.amd) {
-define([], factory);
-  } else if (typeof exports === 'object') {
-module.exports = factory();
-  } else {
-root.Autolinker = factory();
-  }
-}(this, function() {
-/**
- * @class Autolinker
- * @extends Object
- *
- * Utility class used to process a given string of text, and wrap the matches 
in
- * the appropriate anchor (a) tags to turn them into links.
- *
- * Any of the configuration options may be provided in an Object (map) provided
- * to the Autolinker constructor, which will configure how the {@link #link 
link()}
- * method will process the links.
- *
- * For example:
- *
- * var autolinker = new Autolinker( {
- * newWindow : false,
- * truncate  : 30
- * } );
- *
- * var html = autolinker.link( "Joe went to www.yahoo.com" );
- * // produces: 'Joe went to http://www.yahoo.com;>yahoo.com'
- *
- *
- * The {@link #static-link static link()} method may also be used to inline
- * options into a single call, which may be more convenient for one-off uses.
- * For example:
- *
- * var html = Autolinker.link( "Joe went to www.yahoo.com", {
- * newWindow : false,
- * truncate  : 30
- * } );
- * // produces: 'Joe went to http://www.yahoo.com;>yahoo.com'
- *
- *
- * ## Custom Replacements of Links
- *
- * If the configuration options do not provide enough flexibility, a {@link 
#replaceFn}
- * may be provided to fully customize the output of Autolinker. This function 
is
- * called once for each URL/Email/Phone#/Hashtag/Mention (Twitter, Instagram)
- * match that is encountered.
- *
- * For example:
- *
- * var input = "...";  // string with URLs, Email Addresses, Phone #s, 
Hashtags, and Mentions (Twitter, Instagram)
- *
- * var linkedText = Autolinker.link( input, {
- * replaceFn : function( match ) {
- * console.log( "href = ", match.getAnchorHref() );
- * console.log( "text = ", match.getAnchorText() );
- *
- * switch( match.getType() ) {
- * case 'url' :
- * console.log( "url: ", match.getUrl() );
- *
- * if( match.getUrl().indexOf( 'mysite.com' ) === -1 ) {
- * var tag = match.buildTag();  // returns an 
`Autolinker.HtmlTag` instance, which provides mutator methods for easy changes
- * tag.setAttr( 'rel', 'nofollow' );
- * tag.addClass( 'external-link' );
- *
- * return tag;
- *
- * } else {
- * return true;  // let Autolinker perform its normal 
anchor tag replacement
- * }
- *
- * case 'email' :
- * var email = match.getEmail();
- * console.log( "email: ", email );
- *
- * if( email === "my@own.address" ) {
- * return false;  // don't auto-link this particular 
email address; leave as-is
- * } else {
- * return;  // no return value will have Autolinker 
perform its normal anchor tag replacement (same as returning `true`)
- * }
- *
- * case 'phone' :
- * var phoneNumber = match.getPhoneNumber();
- * console.log( phoneNumber );
- *
- * return 'http://newplace.to.link.phone.numbers.to/;>' + phoneNumber + '';
- *
- * case 'hashtag' :
- * 

[Libreoffice-commits] online.git: loleaflet/js loleaflet/Makefile.am loleaflet/package.json

2020-05-29 Thread gokaysatir (via logerrit)
 loleaflet/Makefile.am|2 -
 loleaflet/js/sanitize-url.js |   71 +--
 loleaflet/package.json   |2 -
 3 files changed, 38 insertions(+), 37 deletions(-)

New commits:
commit 160acdc5cbb6724874738240a874b77657cf678c
Author: gokaysatir 
AuthorDate: Fri May 29 18:26:47 2020 +0300
Commit: Henry Castro 
CommitDate: Fri May 29 18:13:18 2020 +0200

update sanitize-url package

Change-Id: I4cc68a010f54afc02777c140b28e41c07a0011fe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95158
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index 5d96e3940..d4126763f 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -102,7 +102,7 @@ NODE_MODULES_SRC =\
select2@4.0.1 \
vex-js@4.1.0 \
l10n-for-node@0.0.1 \
-   @braintree/sanitize-url@3.0.0
+   @braintree/sanitize-url@4.0.1
 
 LOLEAFLET_CSS =\
$(builddir)/node_modules/select2/dist/css/select2.css \
diff --git a/loleaflet/js/sanitize-url.js b/loleaflet/js/sanitize-url.js
index ee8975589..57ee916b0 100644
--- a/loleaflet/js/sanitize-url.js
+++ b/loleaflet/js/sanitize-url.js
@@ -1,45 +1,46 @@
 (function(f){if(typeof exports==="object"& 
module!=="undefined"){module.exports=f()}else if(typeof 
define==="function"&){define([],f)}else{var g;if(typeof 
window!=="undefined"){g=window}else if(typeof 
global!=="undefined"){g=global}else if(typeof 
self!=="undefined"){g=self}else{g=this}g.sanitizeUrl = f()}})(function(){var 
define,module,exports;return (function(){function r(e,n,t){function 
o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof 
require&if(!f&)return c(i,!0);if(u)return u(i,!0);var a=new 
Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var 
p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return 
o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof 
require&,i=0;i -1;
-}
-
-function sanitizeUrl(url) {
-  if (!url) {
-return 'about:blank';
+  var invalidPrototcolRegex = /^(%20|\s)*(javascript|data)/im;
+  var ctrlCharactersRegex = /[^\x20-\x7EÀ-ž]/gmi;
+  var urlSchemeRegex = /^([^:]+):/gm;
+  var relativeFirstCharacters = ['.', '/'];
+  
+  function isRelativeUrlWithoutProtocol(url) {
+return relativeFirstCharacters.indexOf(url[0]) > -1;
   }
-
-  var urlScheme, urlSchemeParseResults;
-  var sanitizedUrl = url.replace(ctrlCharactersRegex, '');
   
-  if (isRelativeUrl(sanitizedUrl)) {
+  function sanitizeUrl(url) {
+var urlScheme, urlSchemeParseResults, sanitizedUrl;
+  
+if (!url) {
+  return 'about:blank';
+}
+  
+sanitizedUrl = url.replace(ctrlCharactersRegex, '').trim();
+  
+if (isRelativeUrlWithoutProtocol(sanitizedUrl)) {
+  return sanitizedUrl;
+}
+  
+urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
+  
+if (!urlSchemeParseResults) {
+  return sanitizedUrl;
+}
+  
+urlScheme = urlSchemeParseResults[0];
+  
+if (invalidPrototcolRegex.test(urlScheme)) {
+  return 'about:blank';
+}
+  
 return sanitizedUrl;
   }
   
-  urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
-
-  if (!urlSchemeParseResults) {
-return 'about:blank';
-  }
-
-  urlScheme = urlSchemeParseResults[0];
-
-  if (invalidPrototcolRegex.test(urlScheme)) {
-return 'about:blank';
-  }
-
-  return sanitizedUrl;
-}
-
-module.exports = {
-  sanitizeUrl: sanitizeUrl
-};
+  module.exports = {
+sanitizeUrl: sanitizeUrl
+  };
 
 },{}]},{},[1])(1)
 });
diff --git a/loleaflet/package.json b/loleaflet/package.json
index a52a754fc..a5655d737 100644
--- a/loleaflet/package.json
+++ b/loleaflet/package.json
@@ -3,7 +3,7 @@
   "version": "0.8.0-dev",
   "description": "LibreOffice online front-end",
   "devDependencies": {
-"@braintree/sanitize-url": "3.0.0",
+"@braintree/sanitize-url": "4.0.1",
 "@types/jquery": "2.0.40",
 "autolinker": "1.4.3",
 "bootstrap": "3.3.6",
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits