diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
index dbf96e2c9..39ac77875 100644
--- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
+++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp
@@ -366,6 +366,19 @@ QByteArray ReplaceValueInPaletteContent(
 	return result;
 }
 
+QByteArray StripCloudTextFields(const QByteArray &text) {
+	const auto firstValue = text.indexOf(": #");
+	auto start = 0;
+	while (true) {
+		const auto index = text.indexOf(kCloudInTextEnd, start);
+		if (index < 0 || index > firstValue) {
+			break;
+		}
+		start = index + kCloudInTextEnd.size();
+	}
+	return (start > 0) ? text.mid(start) : text;
+}
+
 Editor::Inner::Inner(QWidget *parent, const QString &path) : TWidget(parent)
 , _path(path)
 , _existingRows(this, EditorBlock::Type::Existing, &_context)
diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.h b/Telegram/SourceFiles/window/themes/window_theme_editor.h
index b0f6ea58d..499ba4491 100644
--- a/Telegram/SourceFiles/window/themes/window_theme_editor.h
+++ b/Telegram/SourceFiles/window/themes/window_theme_editor.h
@@ -39,6 +39,7 @@ struct ParsedTheme {
 	const QByteArray &value);
 [[nodiscard]] QByteArray WriteCloudToText(const Data::CloudTheme &cloud);
 [[nodiscard]] Data::CloudTheme ReadCloudFromText(const QByteArray &text);
+[[nodisacrd]] QByteArray StripCloudTextFields(const QByteArray &text);
 
 class Editor : public TWidget {
 public:
diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp
index f4a92b3c6..e9752ceef 100644
--- a/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp
+++ b/Telegram/SourceFiles/window/themes/window_theme_editor_box.cpp
@@ -824,7 +824,7 @@ void SaveThemeBox(
 		|| originalParsed.background.isEmpty();
 
 	auto parsed = ParsedTheme();
-	parsed.palette = palette;
+	parsed.palette = StripCloudTextFields(palette);
 	parsed.isPng = false;
 	if (changed) {
 		QBuffer buffer(&parsed.background);