Hi There. I hope I can help.
You found a bug... a old bug noone cared about enough to work on:
We have a home cooked solution that stores the html filtering data in 'portal_transforms.xml' and adds the import/export to generic setup profiles - allowing you to save those settings in a Generic Setup way. Unfortunately, our Plone 4 build on github is MARKED PRIVATE (I grumble at management....) But I'll do my best to share the components and steps.
What we accomplish here is creating a Generic Setup step for Portal Transforms to import and export these data from/to your GS Profile.
This stuff should really be in Products.PortalTransforms but we never asked for it to be pulled in:
( points finger at @tseaver )
Good reading about what we are doing here: https://productsgenericsetup.readthedocs.io/en/latest/handlers.html
Step 1: add an export step to your export_steps.xml
<export-step id="transforms" handler="Products.rfasite.setuphandlers.exportPortalTransformsTool" title="Transforms">
Export portal_transforms tool settings.
step 2: Add an import step to your product in your import_steps.xml
<import-step id="transforms" handler="Products.rfasite.setuphandlers.importPortalTransformsTool" title="Transforms">
Import portal_transforms tool settings.
These make the steps appear in your ZMI under portal_setup.
Put the code behind it in YOUR setuphandlers:
Next: run your export from the ZMI on your older plone instance to generate the portal_transforms.xml file. It will have lots of stuff in it, but specifically your html filter tag settings:
<object name="portal_transforms" meta_type="Portal Transforms">
.... snip ...
<nasty_tag long="1" tag="applet"/>
<nasty_tag long="1" tag="meta"/>
<valid_tag long="1" tag="a"/>
<valid_tag long="1" tag="var"/>
<valid_tag long="1" tag="video"/>
Oy hey, yeah, add the adapter defined in (the pastebin) to your configure.zcml -
Now, do your upgrade.
A manual step now - go back to the ZMI, choose your profile and import the Portal Transforms Tool.
I guess you could add an upgrade step to accomplish this too, if you didn't want to visit the ZMI for each website to export and import.
I hope this is some use to you. Wish there was a better answer.