A platform for community discussion. Free, open, simple.
Extract html content from lithium message template
Vinoth Kannanf3011c709bcb
diff --git a/script/import_scripts/lithium.rb b/script/import_scripts/lithium.rbindex d83fe105e37..0d057b8bbc9 100644--- a/script/import_scripts/lithium.rb+++ b/script/import_scripts/lithium.rb@@ -903,6 +903,13 @@ SQLenddef postprocess_post_raw(raw, user_id)+ matches = raw.match(/<messagetemplate.*<\/messagetemplate>/m)+ matches.each do |match|+ hash = Hash.from_xml(match)+ template = hash["messagetemplate"]["zone"]["item"]+ content = (template[0] || template)["content"] || ""+ raw.sub!(match, content)+ enddoc = Nokogiri::HTML.fragment(raw)