Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Always retain `ul` tag when pasting content enclosed by it.

N-Shar-mae15f518ccc52
diff --git a/web/src/copy_and_paste.js b/web/src/copy_and_paste.js
index 490c13c488f..40a06a8fc67 100644
--- a/web/src/copy_and_paste.js
+++ b/web/src/copy_and_paste.js
@@ -319,7 +319,7 @@ export function paste_handler_converter(paste_html) {
copied_html_fragment.childNodes.length === 1 &&
copied_html_fragment.firstElementChild &&
copied_html_fragment.firstElementChild.innerHTML;
- const outer_elements_to_retain = ["PRE", "OL", "A"];
+ const outer_elements_to_retain = ["PRE", "UL", "OL", "A"];
// If the entire selection copied is within a single HTML element (like an
// `h1`), we don't want to retain its styling, except when it is needed to
// identify the intended structure of the copied content.