Skip to content

Commit

Permalink
conf: Update bundled h5p core and editor to version 1.24.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuurlijk committed Aug 28, 2023
1 parent 7e0aaec commit 9e48945
Show file tree
Hide file tree
Showing 231 changed files with 2,217 additions and 1,600 deletions.
2 changes: 1 addition & 1 deletion Resources/Public/Lib/h5p-core/h5p-development.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private function findLibraries($path) {
$contents = scandir($path);

for ($i = 0, $s = count($contents); $i < $s; $i++) {
if ($contents[$i]{0} === '.') {
if ($contents[$i][0] === '.') {
continue; // Skip hidden stuff.
}

Expand Down
16 changes: 11 additions & 5 deletions Resources/Public/Lib/h5p-core/h5p.classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ public function isValidPackage($skipContent = FALSE, $upgradeOnly = FALSE) {
$totalSize += $fileStat['size'];

$fileName = mb_strtolower($fileStat['name']);
if (preg_match('/(^[\._]|\/[\._])/', $fileName) !== 0) {
if (preg_match('/(^[\._]|\/[\._]|\\\[\._])/', $fileName) !== 0) {
continue; // Skip any file or folder starting with a . or _
}
elseif ($fileName === 'h5p.json') {
Expand Down Expand Up @@ -890,7 +890,7 @@ public function isValidPackage($skipContent = FALSE, $upgradeOnly = FALSE) {
for ($i = 0; $i < $zip->numFiles; $i++) {
$fileName = $zip->statIndex($i)['name'];

if (preg_match('/(^[\._]|\/[\._])/', $fileName) !== 0) {
if (preg_match('/(^[\._]|\/[\._]|\\\[\._])/', $fileName) !== 0) {
continue; // Skip any file or folder starting with a . or _
}

Expand Down Expand Up @@ -2744,7 +2744,7 @@ public static function snakeToCamel($arr, $obj = false) {
foreach ($arr as $key => $val) {
$next = -1;
while (($next = strpos($key, '_', $next + 1)) !== FALSE) {
$key = substr_replace($key, strtoupper($key{$next + 1}), $next, 2);
$key = substr_replace($key, strtoupper($key[$next + 1]), $next, 2);
}

$newArr[$key] = $val;
Expand Down Expand Up @@ -4257,7 +4257,7 @@ private function _filter_xss_split($m, $store = FALSE) {
return '&lt;';
}

if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9\-]+)\s*([^>]*)>?|(<!--.*?-->)$%', $string, $matches)) {
// Seriously malformed.
return '';
}
Expand Down Expand Up @@ -4319,7 +4319,13 @@ private function _filter_xss_attributes($attr, $allowedStyles = FALSE) {
// Attribute name, href for instance.
if (preg_match('/^([-a-zA-Z]+)/', $attr, $match)) {
$attrName = strtolower($match[1]);
$skip = ($attrName == 'style' || substr($attrName, 0, 2) == 'on');
$skip = (
$attrName == 'style' ||
substr($attrName, 0, 2) == 'on' ||
substr($attrName, 0, 1) == '-' ||
// Ignore long attributes to avoid unnecessary processing overhead.
strlen($attrName) > 96
);
$working = $mode = 1;
$attr = preg_replace('/^[-a-zA-Z]+/', '', $attr);
}
Expand Down
19 changes: 19 additions & 0 deletions Resources/Public/Lib/h5p-core/styles/h5p.css
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,25 @@ div.h5p-fullscreen {
opacity: 0;
visibility: hidden;
}
.h5p-content code,
.h5peditor code {
color: #3d3d3d;
background: #e0e0e0;
border-radius: 2px;
padding: 0 5px;
}
.h5p-content pre > code,
.h5peditor pre > code {
background-color: #fafafa;
padding: 5px;
display: block;
line-height: normal;
border: 1px solid #c7c7c7;
border-left-width: 4px;
max-width: 100%;
white-space: pre;
overflow: auto;
}


/* This is loaded as part of Core and not Editor since this needs to be outside the editor iframe */
Expand Down
880 changes: 647 additions & 233 deletions Resources/Public/Lib/h5p-editor/ckeditor/CHANGES.md

Large diffs are not rendered by default.

28 changes: 22 additions & 6 deletions Resources/Public/Lib/h5p-editor/ckeditor/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ Software License Agreement
==========================

CKEditor - The text editor for Internet - https://ckeditor.com/
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.

Licensed under the terms of any of the following licenses at your
choice:

- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/licenses/gpl.html
https://www.gnu.org/licenses/gpl.html
(See Appendix A)

- GNU Lesser General Public License Version 2.1 or later (the "LGPL")
http://www.gnu.org/licenses/lgpl.html
https://www.gnu.org/licenses/lgpl.html
(See Appendix B)

- Mozilla Public License Version 1.1 or later (the "MPL")
http://www.mozilla.org/MPL/MPL-1.1.html
https://www.mozilla.org/MPL/MPL-1.1.html
(See Appendix C)

You are not required to, but if you want to explicitly declare the
Expand All @@ -37,13 +37,15 @@ done by developers outside of CKSource with their express permission.

The following libraries are included in CKEditor under the MIT license (see Appendix D):

* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2019, CKSource - Frederico Knabben.
* CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2021, CKSource - Frederico Knabben.
* PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca.
* CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke <[email protected]> and others.
* ES6Promise - Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors.
* A polyfill for `CSS.escape` (adopted with modifications in `core/tools.js`), Mathias Bynens, v1.5.1, https://mths.be/cssescape.

Parts of code taken from the following libraries are included in CKEditor under the MIT license (see Appendix D):

* jQuery (inspired the domReady function, ckeditor_base.js) - Copyright (c) 2011 John Resig, http://jquery.com/
* jQuery (inspired the domReady function, ckeditor_base.js) - Copyright (c) 2011 John Resig, https://jquery.com/

The following libraries are included in CKEditor under the SIL Open Font License, Version 1.1 (see Appendix E):

Expand Down Expand Up @@ -1418,3 +1420,17 @@ Redistribution and use in source and binary forms, with or without modification,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```


Appendix H: The BSD-2 License
-----------------------------

```
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```

(Ignore this line: %REMOVE_START%)
12 changes: 6 additions & 6 deletions Resources/Public/Lib/h5p-editor/ckeditor/adapters/jquery.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions Resources/Public/Lib/h5p-editor/ckeditor/build-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
* @license Copyright (c) 2003-2022, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/license
*/

Expand All @@ -13,10 +13,10 @@
* (1) https://ckeditor.com/cke4/builder
* Visit online builder to build CKEditor from scratch.
*
* (2) https://ckeditor.com/cke4/builder/d5a8e6ba8b97eef6fe69e57d3dd6d8b7
* (2) https://ckeditor.com/cke4/builder/84b6fa3dae0d9f3cb193260b476e8486
* Visit online builder to build CKEditor, starting with the same setup as before.
*
* (3) https://ckeditor.com/cke4/builder/download/d5a8e6ba8b97eef6fe69e57d3dd6d8b7
* (3) https://ckeditor.com/cke4/builder/download/84b6fa3dae0d9f3cb193260b476e8486
* Straight download link to the latest version of CKEditor (Optimized) with the same setup as before.
*
* NOTE:
Expand All @@ -39,8 +39,8 @@ var CKBUILDER_CONFIG = {
'.jshintrc',
'.mailmap',
'.npm',
'.nvmrc',
'.travis.yml',
'README.md',
'bender-err.log',
'bender-out.log',
'bender.ci.js',
Expand All @@ -49,6 +49,7 @@ var CKBUILDER_CONFIG = {
'gruntfile.js',
'less',
'node_modules',
'package-lock.json',
'package.json',
'tests'
],
Expand All @@ -58,6 +59,8 @@ var CKBUILDER_CONFIG = {
'basicstyles' : 1,
'bidi' : 1,
'clipboard' : 1,
'codeTag' : 1,
'codesnippet' : 1,
'colorbutton' : 1,
'colordialog' : 1,
'elementspath' : 1,
Expand Down
Loading

0 comments on commit 9e48945

Please sign in to comment.