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) #1244

Closed wfeldt closed 2 years ago

wfeldt commented 2 years ago

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 remained the same at 40.555% when pulling 74b6f7a8bfe39aad105cb8472d7c3028e97cd930 on sw_11 into 81558cb5e8ff66b9c5ff1d7473bbce43048e4b1e on SLE-15-SP3.

yast-bot commented 2 years ago

:heavy_check_mark: Internal Jenkins job #6 successfully finished :heavy_check_mark: Created IBS submit request #265371