Skip to content
Snippets Groups Projects
Commit 419f4ac5 authored by Richard Mathot's avatar Richard Mathot
Browse files

[FIX] tools: prevent html_translate crash with malformed HTML

If an user stores malformed HTML code in a *translatable HTML field*,
the ORM won't prevent it (this could be a fix for master as it breaks
existing behaviours) and it could be rendered anyway by browsers.

When reading/prefetching the record, the translation function was
crashing because malformed HTML is obviously malformed XML (the
translation function uses XML internals).

This fix will return the source value as a fallback if the HTML field is
malformed (and thus not translatable) + log the error.
parent 343170a6
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment