Title: Problem importing file containing HTML code in some fields
Last modified: July 15, 2022

---

# Problem importing file containing HTML code in some fields

 *  Resolved [lbnn](https://wordpress.org/support/users/lbnn/)
 * (@lbnn)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/)
 * Hello,
 * I have several fields in BuddyPress that contain some HTML code inside.
    When
   I fill the field manually in the website there is no problem.
 * I tried to export the field and everything is okay.
 * But now if I want to create a user with the same value, I get the following error:
   Problem uploading file to import. Error details: ‘You do not have permission 
   to upload this type of file.’
 * If I remove this field and the value contained in it, it works…
 * How can I import users with such types of fields ?
 * Here is an example of the value contained in the field : `<a href="https://mywebsite.
   com/members/brian-kitchen/">Brian Kitchen</a>`
 * When I export it the value is a bit different : `"<a href=""https://cousinadefrancoispasquier.
   fr/membres/anne-bonin/"">Anne BONIN</a>"`
 * I tried both and it fails every time.
 * Please, found me a solution, I have 3 fields for each user that contain such 
   values.
 * Thank you for your help.
 * Wordpress version : 6.0.1
    BuddyPress version : 10.3.0 Theme : BuddyX 4.3.9 Website
   URL : Private website closed for public people
    -  This topic was modified 3 years, 11 months ago by [lbnn](https://wordpress.org/support/users/lbnn/).
    -  This topic was modified 3 years, 11 months ago by [lbnn](https://wordpress.org/support/users/lbnn/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827352)
 * [@lbnn](https://wordpress.org/support/users/lbnn/),
 * I am not sure about your problem. The problem is the ” that appears or that the
   string changes and contains value from another user?
 *  Thread Starter [lbnn](https://wordpress.org/support/users/lbnn/)
 * (@lbnn)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827380)
 * Hello [@carazo](https://wordpress.org/support/users/carazo/),
 * Thank you for paying attention to my question.
 * The problem is that it seems that I can’t import a user with a field containing
   some HTML code.
 * The field is supposed to contain an HTML link, but no matter what the link is
   referring to, I got an error when trying to upload.
 * I’m not teaching you anything if I told you that a link in HTML can be written
   like this : `<a href="https://test.com/">Test</a>`
 * I need this value in a field but can’t import it, it fails every time I try.
 * So I try to insert it manually in my website and export it to see where I’m mistaken
   and got this result in the exported file : `"<a href=""https://test.com/"">Test
   </a>"`
 * And when I try to import with the same value it also failed and if I remove it
   from the file, the file is well imported so I think there is something wrong 
   somewhere.
 * Is it more clear ?
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827403)
 * Could you tell me which error appears?
 * HTML code can contain malicious code so surely the problem comes from there.
 *  Thread Starter [lbnn](https://wordpress.org/support/users/lbnn/)
 * (@lbnn)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827419)
 * [@carazo](https://wordpress.org/support/users/carazo/)
 * Yes, of course but since you need to be admin to run the tool and that it’s a
   private website for private use, it would be great to be able to do that.
 * I get this error : Problem uploading file to import. Error details: ‘You do not
   have permission to upload this type of file.’
 * If I remove the field of the .csv file, it works…
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827439)
 * [@lbnn](https://wordpress.org/support/users/lbnn/),
 * This is not a problem created by this plugin.
 * This error is thrown out of this plugin. Something checks some security issue
   and raise this error, stopping this plugin.
 * Check if you have some security plugin activated and also, include this directive
   in wp-config.php: define(‘ALLOW_UNFILTERED_UPLOADS’, true);
 * Anyway, remember: this is a free plugin, I work for free in it for hours and 
   I give free support asap, but I cannot attend to personal problems (more in this
   case that the problem comes from another part of your site).
 *  Thread Starter [lbnn](https://wordpress.org/support/users/lbnn/)
 * (@lbnn)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827648)
 * [@carazo](https://wordpress.org/support/users/carazo/)
 * Yes of course I fully understand.
 * I already tried to add this code in wp-config.php but doesn’t change anything:/
 * I’m not sure because when I add it manually in the profile field directly in 
   the website, it works, it’s only during the import part that it fails.
 * I think it’s a problem related to ” characters.
 * I succeeded to create a user with this in the file `"<a href"="https://test.com"
   >Test</a>"`
 * ”
 * Then I need to update database to remove the ” manually, it’s really not the 
   best practice but it works, if you have an other idea, don’t hesitate 😉
    -  This reply was modified 3 years, 11 months ago by [lbnn](https://wordpress.org/support/users/lbnn/).
    -  This reply was modified 3 years, 11 months ago by [lbnn](https://wordpress.org/support/users/lbnn/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Problem importing file containing HTML code in some fields’ is closed
to new replies.

 * ![](https://ps.w.org/import-users-from-csv-with-meta/assets/icon-256x256.png?
   rev=1174343)
 * [Import and export users and customers](https://wordpress.org/plugins/import-users-from-csv-with-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv-with-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [lbnn](https://wordpress.org/support/users/lbnn/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/problem-importing-file-containing-some-html-code-in-some-fields/#post-15827648)
 * Status: resolved