Escape title and text when rendering HTML editor

Closes #15032
(grafted from 0c76d2bc755882d3633a9452c585412f7847d797)

--HG--
branch : 8.0
This commit is contained in:
Cédric Krier
2026-09-30 09:39:21 +02:00
parent 425d0cef08
commit 0bd4a6f8a1
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
* Escape title and text when rendering HTML editor (issue15032)
Version 8.0.10 - 2026-09-16
---------------------------
+3 -2
View File
@@ -2,6 +2,7 @@
# this repository contains the full copyright notices and license terms.
import csv
import datetime as dt
import html
import io
import json
from numbers import Number
@@ -92,8 +93,8 @@ def html_editor(request, pool, model, record, field):
'class': get_config(
['class', model, field.name], default="''"),
'language': transaction.language,
'title': title,
'text': text,
'title': html.escape(title),
'text': html.escape(text),
'csrf_token': csrf_token,
'error': error,
}, status, content_type='text/html')