Attributed bbcode [quote] is causing an error
shriker opened this issue · comments
Jodie Struthers commented
Need to adjust the regex to more thoroughly sanitize data from XenForo [QUOTE] tags.
JoshyPHP commented
There's a better way to handle BBCodes:
- Obtain a copy of the parser used in Flarum. You can do that manually outside of your migration script.
- Serialize the parser and save it as part of your script.
- Unserialize and use the parser to parse posts from XenForo.
As a proof-of-concept, you can take XenForo's posts and process them via s9e\TextFormatter\Bundles\Forum::parse($text_goes_here)
and it will give you a decent approximation of what Flarum's XML would look like.
Jodie Struthers commented
I totally agree. The bbcode conversion in here is nearly a 1:1 copy of the forked repo that is pretty quick & dirty. While it works, it's less than ideal.