John McLear 2f8e37805f
fix: prevent crash when pasting bare <li> without parent list element (#7431)
When HTML containing <li> elements without a wrapping <ul> or <ol> is
pasted (e.g., from ChatGPT), the contentcollector crashes with
"TypeError: lineAttributes.list is undefined" because it assumes
_enterList() was already called by a parent list element.

The fix defaults bare <li> elements to bullet1 list type and properly
sets oldListTypeOrNull so the list state is cleaned up after the <li>
is processed. Also guards the .indexOf() call on lineAttributes.list.

Fixes: https://github.com/ether/etherpad-lite/issues/6665

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 07:11:08 +01:00
..
2024-03-09 23:07:09 +01:00
2024-08-18 12:14:24 +02:00
2024-02-05 21:13:02 +01:00

Ignore this file and see the file in the base installation folder