FIX: the phpbbb import script was not parsing youtube tags (#17787)

This commit is contained in:
Constanza
2022-08-05 15:20:32 -04:00
committed by GitHub
parent 2003c2d4cd
commit 8836c8bcdf
2 changed files with 14 additions and 1 deletions

View File

@ -185,6 +185,13 @@ module ImportScripts::PhpBB3::BBCode
end
end
def visit_YOUTUBE(xml_node, md_node)
youtube_id = xml_node.attr("content")
md_node.text = "https://www.youtube.com/watch?v=" + youtube_id
md_node.prefix_linebreaks = md_node.postfix_linebreaks = 1
md_node.skip_children
end
def visit_QUOTE(xml_node, md_node)
if post = quoted_post(xml_node)
md_node.prefix = %Q{[quote="#{post[:username]}, post:#{post[:post_number]}, topic:#{post[:topic_id]}"]\n}