IBX-10425: Translated string is returned as XML#29
IBX-10425: Translated string is returned as XML#29mateuszdebinski wants to merge 4 commits into4.6from
Conversation
7945846 to
d3ec14a
Compare
|
…n-a-translated-string # Conflicts: # phpstan.neon
57030ba to
0d8cd24
Compare
|
There was a problem hiding this comment.
You should add unit coverage for EncoderHelper::clearCDATAInTextField() to prove it strips CDATA on non‑RichText fields while preserving RichText, and an integration-style Encoder test that asserts the final XML contains plain text for regular fields and the placeholder tags for RichText. This guards the new logic and prevents regressions.
| if (!$textNode instanceof DOMCdataSection) { | ||
| continue; | ||
| } | ||
| $parent = $textNode->parentNode; |
There was a problem hiding this comment.
$parent can be a non-element node, so calling getAttribute() may fatally error. You can check, like aboveif it isDOMElement`
| use Ibexa\FieldTypeRichText\FieldType\RichText\Value as RichTextValue; | ||
| use RuntimeException; | ||
|
|
||
| class EncoderHelper |
There was a problem hiding this comment.
| class EncoderHelper | |
| final class EncoderHelper |





Description:
For QA:
Documentation: