terminal42 / contao-notification_center

The most popular notification configuration extension for the Contao Open Source CMS!
64 stars 38 forks source link

add raw_data_html & raw_data_filled_html tokens #293

Closed ngdot closed 9 months ago

ngdot commented 1 year ago

Added raw_data_html & raw_data_filled_html tokens for html content with real html line breaks, to prevent using {{flag::##raw_data_filled##|nl2br}}

aschempp commented 11 months ago

I'm not sure this is necessary, can you please verify my idea? If raw_data contains HTML (and line breaks), the HTML should be stripped when output into the text field. Can you try if that works? Maybe we just need to add HTML line breaks to the existing token?

ngdot commented 9 months ago

Hi, sorry for the late response!

For me personally, it would be much easier to use just "raw_data" oder "raw_data_filled" instead of new tokens – but I don't know if its good to change the current default behavior. Maybe someone wants to have the current behavior.

And I think we have to check in which context "raw_data" is used, instead of checking if its contain html, because the value may not necessarily contain HTML, or?

Toflar commented 9 months ago

I won't merge any new features in version 1.x as version 2 is around the corner and to be released very, very soon. I'm cleaning up PRs and closing them so we can have a clean project once v2 is here 😊 So please feel free to create a PR against version 2 once it's released, in case you still care about it. But maybe you'll also see that you can easily integrate it as your own extension or whatever 😊 Thanks for contributing!