Title: test_runner: fix line feed escaping in JUnit by AlexCannonball · Pull Request #60274 · nodejs/node · GitHub
Open Graph Title: test_runner: fix line feed escaping in JUnit by AlexCannonball · Pull Request #60274 · nodejs/node
X Title: test_runner: fix line feed escaping in JUnit by AlexCannonball · Pull Request #60274 · nodejs/node
Description: Fixes #59593 (a part related to the XML failure:message attribute value)
Cause
In escapeAttribute line feed characters were simply removed, so multi-line messages were distorted in the report, like:
The value must be 01 !== 0
However, the original message is:
The value must be 0
1 !== 0
Solution motivation
https://www.w3.org/TR/WD-xml-970807#sec3.3.3
Character references and references to internal text entities must be expanded
Thus, the character reference
must be expanded by the XML report processor/application to the line feed character.
Changes
I used the decimal code
as a decimal one is already used in escapeComment.
/(&)(?!#\d{1,7};)/g in escapeContent prevents escaping & in decimal character references.
Updated the test snapshot.
Effect
-
Open Graph Description: Fixes #59593 (a part related to the XML failure:message attribute value) Cause In escapeAttribute line feed characters were simply removed, so multi-line messages were distorted in the report, like...
X Description: Fixes #59593 (a part related to the XML failure:message attribute value) Cause In escapeAttribute line feed characters were simply removed, so multi-line messages were distorted in the report, like...
Opengraph URL: https://github.com/nodejs/node/pull/60274
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0aa5f93b-a566-afc3-e6ef-5f334f61b4bb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A3EA:2D341C:4EBA9A:6A8DDD:6A4C3233 |
| html-safe-nonce | 6d65810a1e3a5d5788454f81008231321af5a6217bce577b9909d36e49e1187a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0VBOjJEMzQxQzo0RUJBOUE6NkE4REREOjZBNEMzMjMzIiwidmlzaXRvcl9pZCI6IjYyMzA4MzEyNDEzMjAyMTUwOTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 15d75f100e644b373c7c056bee3fbce59318bf42ecca172a249cfffd3e023b33 |
| hovercard-subject-tag | pull_request:2918615192 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/60274/files |
| twitter:image | https://avatars.githubusercontent.com/u/42497203?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/42497203?s=400&v=4 |
| og:image:alt | Fixes #59593 (a part related to the XML failure:message attribute value) Cause In escapeAttribute line feed characters were simply removed, so multi-line messages were distorted in the report, like... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ee13484b32cf23e15fde191da4c9aa47d41201c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width