yast / yast-yast2

YaST module yast2
http://en.opensuse.org/Portal:YaST
GNU General Public License v2.0
54 stars 44 forks source link

do not strip surrounding white space in CDATA XML elements (bsc#1195910) #1245

Closed wfeldt closed 2 years ago

wfeldt commented 2 years ago

Task

Port https://github.com/yast/yast-yast2/pull/1244 to SLE15-SP4/TW.

Original task

Surrounding white space in some elements may be desired. Like in scripts or other file content.

Solution

Do not strip surrounding white space when reading XML CDATA elements. And create CDATA elements when generating XML if an element contains surrounding white space.

Note

This reworks https://github.com/yast/yast-yast2/pull/1243.

I did some checks and prior to SLE15-SP3 we did preserve all white space in CDATA elements. This also does not pose a problem in script elements. Leading white space is ok there.

So, this pull request fully restores the old behavior.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.006%) to 41.638% when pulling 24a59f76286c571b729bc72623800484486eb9dc on sw_20 into ae298a6d5dec5b9f14c5dc228d1e7013aec0abf9 on master.

yast-bot commented 2 years ago

:heavy_check_mark: Public Jenkins job #359 successfully finished :heavy_check_mark: Created OBS submit request #955663

yast-bot commented 2 years ago

:heavy_check_mark: Internal Jenkins job #193 successfully finished :heavy_check_mark: Created IBS submit request #265414