]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
report: encode cdata sections correctly
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 00:53:04 +0000 (17:53 -0700)
committerZorro Lang <zlang@kernel.org>
Sun, 26 Mar 2023 14:04:05 +0000 (22:04 +0800)
commit77bedb6a7db2c4727fe033819bf3e03a1e8bb06b
tree34c9cb9cdb8b9e52d8b9de3ffa6824d4636f39e8
parenta8963ceb25ef375bdc8cd89bdcaf87f72d9cc7ac
report: encode cdata sections correctly

The XML report format captures the contents of .full and .out.bad files
in CDATA sections.  CDATA sections are supposed to be a stream of
verbatim data, terminated with a "]]>".  Hence XML entities such as
quotation marks and angle brackes should not be escaped, and an actual
bracket-bracket-gt sequence in those files /does/ need escaping.

Create a separate filtering function so that these files are encoded
properly.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/report