terminal42 / contao-leads

Leads extension for Contao Open Source CMS; Store and manage form data with ease!
GNU Lesser General Public License v3.0
36 stars 24 forks source link

[v3] HTML of export list is broken #139

Closed rabauss closed 1 year ago

rabauss commented 1 year ago

Unfortunately the following replacement with regex <[^>]+>\s*<\/[^>]+> in https://github.com/contao/contao/blob/4.13/core-bundle/src/Resources/contao/classes/DataContainer.php#L1767 also removes the last two closing tags of the format here: https://github.com/terminal42/contao-leads/blob/e0085e3ea3cfc133f916847030d74f4c23b1080b/contao/dca/tl_lead_export.php#L26

for example the following label

<div style="display:flex"><span style="width:50%;margin-right:10px;font-weight:500">Export all</span><span style="width:30%;margin-right:10px">Custom export</span><span style="width:20%;">export_##datim##.xlsx</span></div>

is replaced to:

<div style="display:flex"><span style="width:50%;margin-right:10px;font-weight:500">Export all</span><span style="width:30%;margin-right:10px">Custom export</span><span style="width:20%;">export_##datim##.xlsx

I'm not sure if it need to be solved in the core or if we could optimize the new label format. What do you think?

aschempp commented 1 year ago

I have opened a pull request in Contao to fix this (see contao/contao#5930) but this should also be fixed by c917ea8d84249b5623d8c68cd676b6aff4a417cf, can you confirm?

rabauss commented 1 year ago

The workaround https://github.com/terminal42/contao-leads/commit/c917ea8d84249b5623d8c68cd676b6aff4a417cf is not nice but looks good to me! Thank you also for the PR in the core!