diff --git a/app/models/theme.rb b/app/models/theme.rb
index c8b577763f0..ef34ef6a946 100644
--- a/app/models/theme.rb
+++ b/app/models/theme.rb
@@ -6,7 +6,7 @@ require 'json_schemer'
class Theme < ActiveRecord::Base
include GlobalPath
- BASE_COMPILER_VERSION = 67
+ BASE_COMPILER_VERSION = 68
attr_accessor :child_components
@@ -394,7 +394,12 @@ class Theme < ActiveRecord::Base
end
caches = JavascriptCache.where(theme_id: theme_ids)
caches = caches.sort_by { |cache| theme_ids.index(cache.theme_id) }
- return caches.map { |c| "" }.join("\n")
+ return caches.map do |c|
+ <<~HTML.html_safe
+
+
+ HTML
+ end.join("\n")
end
list_baked_fields(theme_ids, target, name).map { |f| f.value_baked || f.value }.join("\n")
end
diff --git a/app/models/theme_field.rb b/app/models/theme_field.rb
index 475e3541565..4c45b08b60d 100644
--- a/app/models/theme_field.rb
+++ b/app/models/theme_field.rb
@@ -148,7 +148,14 @@ class ThemeField < ActiveRecord::Base
javascript_cache.source_map = js_compiler.source_map
javascript_cache.save!
- doc.add_child("") if javascript_cache.content.present?
+ if javascript_cache.content.present?
+ doc.add_child(
+ <<~HTML.html_safe
+
+
+ HTML
+ )
+ end
[doc.to_s, errors&.join("\n")]
end
@@ -241,7 +248,13 @@ class ThemeField < ActiveRecord::Base
javascript_cache.source_map = js_compiler.source_map
javascript_cache.save!
doc = ""
- doc = "" if javascript_cache.content.present?
+ if javascript_cache.content.present?
+ doc =
+ <<~HTML.html_safe
+
+
+ HTML
+ end
[doc, errors&.join("\n")]
end