From 7a96c0b60e4fbacdd176e3433463a463eefcaf84 Mon Sep 17 00:00:00 2001 From: "Kyle D. McCormick" Date: Mon, 23 Sep 2024 16:28:37 -0400 Subject: [PATCH] fix: don't wrap HTML data with newlines when serializing for LC Closes: https://github.com/openedx/edx-platform/issues/35525 --- openedx/core/lib/xblock_serializer/block_serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx/core/lib/xblock_serializer/block_serializer.py b/openedx/core/lib/xblock_serializer/block_serializer.py index 966380f25061..f12bf5336af5 100644 --- a/openedx/core/lib/xblock_serializer/block_serializer.py +++ b/openedx/core/lib/xblock_serializer/block_serializer.py @@ -133,7 +133,7 @@ def _serialize_html_block(self, block) -> etree.Element: # Escape any CDATA special chars escaped_block_data = block.data.replace("]]>", "]]>") - olx_node.text = etree.CDATA("\n" + escaped_block_data + "\n") + olx_node.text = etree.CDATA(escaped_block_data) return olx_node