N°5298 - Update CKEditor to version 5

This commit is contained in:
Stephen Abello
2024-03-11 16:48:50 +01:00
parent 14c637c7f3
commit dc553ca83c
1082 changed files with 82130 additions and 23369 deletions

View File

@@ -15,6 +15,8 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
use Masterminds\HTML5;
/**
* Base class for all possible implementations of HTML Sanitization
*/
@@ -287,7 +289,7 @@ class HTMLDOMSanitizer extends DOMSanitizer
'u' => array(),
'em' => array(),
'strong' => array(),
'img' => array('src', 'style', 'alt', 'title'),
'img' => array('src', 'style', 'alt', 'title', 'width', 'height'),
'ul' => array('style'),
'ol' => array('reversed', 'start', 'style', 'type'),
'li' => array('style', 'value'),
@@ -321,6 +323,8 @@ class HTMLDOMSanitizer extends DOMSanitizer
'hr' => array('style'),
'pre' => array(),
'center' => array(),
'figure' => array('class'), // Ckeditor 5 puts images in figures
'mark' => array('class')
);
protected static $aAttrsWhiteList = array(
@@ -332,6 +336,7 @@ class HTMLDOMSanitizer extends DOMSanitizer
* @see https://www.itophub.io/wiki/page?id=2_6_0%3Aadmin%3Arich_text_limitations
*/
protected static $aStylesWhiteList = array(
'aspect-ratio',
'background-color',
'border',
'border-collapse',