- Issue created by @m.gaebler
When the title in the xml has a trailing whitespace character this remains part of the title. This caused an issue when we used the title in a twig template for different attributes (id and data-modal-toggle). I am not sure why, but the data-modal-toggle attribute ended in a '-' character, but the id had the whitespace trimmed, even though we used the same twig filters. The result was that the modal would nog longer open without adding a trim filter.
It seems cleaner to trim the title upon reading it from the xml instead of fixing it later.
(1) Upload an xml with a trailing whitespace in the title and save the media item. (E.g.,: Lorum ipsum )
(2) Go back to the edit page and see that the whitespace is at the end of the title.
We can use the trim() function to remove the trailing whitespace.
Active
1.0
Code