Support

Account

Home Forums Bug Reports Problem with HTML in export to PHP

Solved

Problem with HTML in export to PHP

  • hey,

    I’ve found an issue with exporting field groups that I thought you should be aware of. Just so you know, I’m not in a hurry to see it fixed but I figure that it will continue to be a problem in ACF5.

    I’m working on building a plugin that will use ACF and I’m exporting a field group that I’ve created to put into the plugin.

    There are many fields and help messages. Some of the instructions and messages display HTML markup. I enter this markup into the message or instructions something like this:
    <form>
    This works fine when these fields are displayed until I export the field group’ and then try to use that export in my plugin. When I do that it is exported as:
    <form>
    As you might guess, this completely breaks the display of the field group on my custom post type. You have to go into the values exported in the array and manually edit all the < and > back into < and >

    Not even sure this can be corrected, like I said, just wanted you to be aware of it. Maybe something that can be corrected in the new ACF5 🙂 Again, no need to rush to fix this. I’d rather not take away from time to work on the new version, really looking forward to it.

  • Heh, and all my nice coding was altered here as well, see if this works I enter & lt ; (remove the spaces) and it is exported as <

  • Hi @Hube2

    Thanks for the bug report. V5 uses a .json format instead of PHP arrays, so any HTML should be escaped correctly fixing this issue by itself!

    ACF5 will be out in beta this week. Would you mind doing some testing with it?

    Thanks
    E

  • I’m working on creating a duplicate of the R&D site I am working on the new plugin on. I’ll try install/update to ACF5 there and see how the export works, among other things.

    I’ve been trying to watch the progress on ACF5, there were a few missing features the last time I looked that I really need to have to work on this plugin.

  • I guess I need to wait, no export to PHP yet. There is a bug in the export as it is, I’ll post that to issues on github

  • Hi @Hube2

    Please note that the ‘export to PHP’ feature has gone in favor of an export to .json

    Thanks
    E

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

The topic ‘Problem with HTML in export to PHP’ is closed to new replies.