diff --git a/script/import_scripts/lithium.rb b/script/import_scripts/lithium.rb index d83fe105e37..0d057b8bbc9 100644 --- a/script/import_scripts/lithium.rb +++ b/script/import_scripts/lithium.rb @@ -903,6 +903,13 @@ SQL end def postprocess_post_raw(raw, user_id) + matches = raw.match(//m) + matches.each do |match| + hash = Hash.from_xml(match) + template = hash["messagetemplate"]["zone"]["item"] + content = (template[0] || template)["content"] || "" + raw.sub!(match, content) + end doc = Nokogiri::HTML.fragment(raw)