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

Fixed vB Importer: Unnecessary htmlentities for User Fields

Discussion in 'Resolved Bug Reports' started by rellek, Jul 1, 2013.

  1. rellek

    rellek Well-Known Member


    I was playing around with some import from vB 3.8 to XF and I found that the importer does htmlentities to the user fields. So it comes that we get & when before there was &.

    Look at the attachments and you'll see what I mean. There is Occupation/Beruf.

    Thanks for your time.

    Attached Files:

    AlexT likes this.
  2. Kier

    Kier XenForo Developer Staff Member

    I'm sure there's a reason for that... I'm trying to remember if there was a vBulletin option to htmlspecialchars user fields... looking into it now.
    rellek likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    It actually appears to just not do the extra decode that's necessary, so fixed now.
    rellek likes this.
  4. rellek

    rellek Well-Known Member

    Well, it still converted & to & in XF 1.2 RC 1.
  5. Mike

    Mike XenForo Developer Staff Member

    Can you provide a dump of your vB database? (Don't need threads and posts, just users.)
  6. rellek

    rellek Well-Known Member

    Do you mean everything but post, thread, pmtext, pm or just userfields and user?
  7. Mike

    Mike XenForo Developer Staff Member

    The simplest thing would be the whole database as it pulls from different tables, but I could probably manage with just the custom field and user field related data.
  8. rellek

    rellek Well-Known Member

    PC'd you. :)
    shenmuee likes this.
  9. Mike

    Mike XenForo Developer Staff Member

    Right, me being sort of stupid here - there was a legitimate bug in the custom field import but it was separate from this. We have a few standard fields that get imported from custom fields.

    In this case, changing this line of library/XenForo/Importer/vBulletin.php:
    $import['occupation'] = $this->_convertToUtf8($user['field4']);
    $import['occupation'] = $this->_convertToUtf8($user['field4'], true);
    Sorts it. This applies to the 3 other instances directly above it as well.

    Thanks for the test data. :)
    rellek and AlexT like this.
  10. rellek

    rellek Well-Known Member

    Sounds good :) You're welcome. I hope you still have the data as there is another bug...

Share This Page