Commit ddde13f
Fix XML literals to be XML-decoded when converted to C# strings
This updates `XmlExpressionConverter.cs` to use `ValueText` instead of `Text` when converting XML strings and text nodes so that XML entities like `<` are correctly evaluated as their decoded values. The test expectations have been updated appropriately to match the resulting actual string outputs which naturally produce the raw decoded literal character escapes like `\n` instead of verbatim multiline formats. A unit test proving the fix for the reported issue is also included.
Co-authored-by: GrahamTheCoder <[email protected]>1 parent 2c2b64e commit ddde13f
File tree
3 files changed
+32
-29
lines changed- CodeConverter/CSharp
- Tests/CSharp/ExpressionTests
3 files changed
+32
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 123 | + | |
129 | 124 | | |
130 | 125 | | |
131 | 126 | | |
132 | 127 | | |
133 | 128 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 129 | + | |
143 | 130 | | |
144 | 131 | | |
145 | 132 | | |
| |||
373 | 360 | | |
374 | 361 | | |
375 | 362 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 363 | + | |
387 | 364 | | |
388 | | - | |
| 365 | + | |
389 | 366 | | |
390 | 367 | | |
391 | 368 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments