A platform for community discussion. Free, open, simple.
Remove support for theme settings in raw handlebar templates
Vinoth Kannan19e8f9af1346
diff --git a/app/assets/javascripts/discourse/helpers/theme-setting-injector.es6 b/app/assets/javascripts/discourse/helpers/theme-setting-injector.es6index a9da2e70d31..715b0eed3dc 100644--- a/app/assets/javascripts/discourse/helpers/theme-setting-injector.es6+++ b/app/assets/javascripts/discourse/helpers/theme-setting-injector.es6@@ -18,7 +18,3 @@ function inject(context, key, value) {registerHelper('theme-setting-injector', function(arr, hash) {inject(hash.context, hash.key, hash.value);});--Handlebars.registerHelper('theme-setting-injector', function(hash) {- inject(hash.data.root, hash.hash.key, hash.hash.value);-});diff --git a/app/models/theme_field.rb b/app/models/theme_field.rbindex 780ff579737..36636251fa8 100644--- a/app/models/theme_field.rb+++ b/app/models/theme_field.rb@@ -69,7 +69,7 @@ PLUGIN_API_JSis_raw = name =~ /\.raw$/if is_raw- template = "requirejs('discourse-common/lib/raw-handlebars').template(#{Barber::Precompiler.compile(hbs_template)})"+ template = "requirejs('discourse-common/lib/raw-handlebars').template(#{Barber::Precompiler.compile(node.inner_html)})"node.replace <<COMPILED<script>(function() {