Skip to content

[BUGFIX] Ensure returned value to CKeditor is not entity encoded#12

Merged
calien666 merged 2 commits intomainfrom
task/improvements
Jul 11, 2025
Merged

[BUGFIX] Ensure returned value to CKeditor is not entity encoded#12
calien666 merged 2 commits intomainfrom
task/improvements

Conversation

@calien666
Copy link
Member

@calien666 calien666 commented Jul 11, 2025

The HtmlParser used the DOM Document methods saving the html for the
return to the system. This is fine, but with DOMDocument::saveHTML()
all possible characters were converted to their respective html
entities. While working inside TYPO3, the main character encoding is
UTF-8 in most cases and the result should return the content as-is
and not with entities encoded.

With switching the parser to return the rendered XML, this issue doesn't
appear, as DOMDocument::saveXML() doesn't convert to HTML entities.

While debugging, a `console.log` was forgotten to remove. As this could
lead to issues in some browsers, remove the code.
The `HtmlParser` used the DOM Document methods saving the html for the
return to the system. THis is fine, but with `DOMDocument::saveHTML()`
all possible characters were converted to their respective html
entities. While working inside TYPO3, the main character encoding is
`UTF-8` in most cases and the result should return the content `as-is`
and not with entities encoded.

With switching the parser to return the rendered XML, this issue doesn't
appear, as `DOMDocument::saveXML()` doesn't convert to HTML entities.
@calien666 calien666 force-pushed the task/improvements branch from 4da25be to c3ade10 Compare July 11, 2025 10:06
@calien666 calien666 merged commit 2073fec into main Jul 11, 2025
2 checks passed
@calien666 calien666 deleted the task/improvements branch July 11, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants