-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
Description of the bug
CKEditor crashes when pasting an <img> element that contains a width value within its style attribute.
Steps To Reproduce
To reproduce the behavior:
- In a Vanilla installation of Backdrop, create a page
- In the body field, click on "Source" so that you can paste the HTML code
- Paste the following HTML code:
<img src="https://www.sasa.gov.uk/sites/default/files/scottish.png" alt="View this document" style="width: 100%;">- Click the Source button again
- Check the browser's console
At this point, CKEditor completely crashes, and it's impossible to do any further editing. Saving the page will not save the body field either.
Actual behavior
CKEditor crashes
Expected behavior
CKEditor should not crash.
Additional information
This is the error generated in the console (I've disabled JS agregation)
ckeditor5.umd.js?v=1.32.x-dev:11 Uncaught CKEditorError: Cannot read properties of undefined (reading 'toString')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Cannot read properties of undefined (reading 'toString')
at _getResizedWidthHeight (backdrop-image.js?v=1.32.x-dev:335:24)
at Uo.converter (backdrop-image.js?v=1.32.x-dev:524:37)
at Uo.fire (ckeditor5.umd.js?v=1.32.x-dev:11:6816)
at Uo._testAndFire (ckeditor5.umd.js?v=1.32.x-dev:11:196843)
at Uo._testAndFireAddAttributes (ckeditor5.umd.js?v=1.32.x-dev:11:197057)
at Object.convertAttributes (ckeditor5.umd.js?v=1.32.x-dev:11:197366)
at Uo.<anonymous> (ckeditor5.umd.js?v=1.32.x-dev:11:227428)
at Uo.fire (ckeditor5.umd.js?v=1.32.x-dev:11:6816)
at Uo._testAndFire (ckeditor5.umd.js?v=1.32.x-dev:11:196843)
at Uo._convertInsert (ckeditor5.umd.js?v=1.32.x-dev:11:194923)
Add any other information that could help, such as:
- Backdrop CMS version: 1.32.x-dev
- Browser(s) and their versions: Chrome Version 139.0.7258.128
Reactions are currently unavailable