• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 What's the best way to cleanup broken font tags after migration from vB?

popowich

Active member
#1
What's the best way to fix this so that the following "Example Text" becomes quoted text instead of plain text surrounded by broken tags?

[FONT=&quot] Example Text [/FONT]

I think to start I want to replace [FONT=&quot] with [ q-u-o-t-e-] (without the dashes)

How to fix the associated [/FONT] without breaking [/font]'s not related to [q-u-o-t-e] concerns me.
 

popowich

Active member
#3
What about other fonts?

It's wrong of me to always replace [/font] with "close quote" since it could have been used for other fonts?

Unless there is a way to rig up that [/font] can also be used to close a quote?

Then I'd only need to fix the code that opened the quotes.
 

Brogan

XenForo moderator
Staff member
#4
I'm not entirely sure what you mean by replacing font tags with quote tags as they are unrelated.

BB code should always have opening and closing tags, otherwise it will result in malformed output.

If there are erroneous tags and/or unclosed tags, they will all need to be dealt with.
 

popowich

Active member
#5
I think I'm losing my mind. With some searching it seems to not be too bad. Maybe it was an importer issue. I'm manually fixing several threads but it's manageable.
 

popowich

Active member
#6
I think I figured it out. It has to do with copied and pasted text from other sources into the forums, at least sometimes with non-standard fonts applied, and maybe actual quotes " " within that condition that did not import correctly sometimes too. They turned into broken font tags. Hope that helps. It's not a huge deal. A forum migrating millions of posts this might be a bigger concern since it could turn into more work than can be manually accomplished.

BTW, I noticed that bullet lists all have an extra line space inserted above them now too, again, no huge deal, but I can't help but fix them when I see them so there isn't a gap in the post.
 
Last edited:

popowich

Active member
#7
Maybe indents. Watch for the next few members who do vB3 migrations to XenForo and when they're done use the search box to search for:

[FONT=QUOT

And I think you'll be able to investigate from there. There might be an opportunity to improve the importer.
 
#8
Though this thread is old, I'll answer what I did:

I replaced FONT=&quot with FONT="" or FONT=''.

I also had to create a custom BBcode called something like [ zfont ] for font="Times,Arial" - those with commas in them and did a regex replace of all old font tags with commas in them.