[FIX] pad, pad_project: mark pad output as markup-safe

And remove the now unnecessary `t-raw` to embed it.
This commit is contained in:
Xavier Morel
2021-04-29 05:34:20 +00:00
parent 3786e1dcb0
commit 40cf0f452a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import re
import string
import requests
from markupsafe import Markup
from odoo import api, models, _
from odoo.exceptions import UserError
@@ -99,7 +100,7 @@ class PadCommon(models.AbstractModel):
if mo:
content = mo.group(1)
return content
return Markup(content)
# TODO
# reverse engineer protocol to be setHtml without using the api key
@@ -23,7 +23,7 @@
</div>
</t>
<t t-else="">
<div class="py-1 px-2 bg-100 small" t-raw="task._get_pad_content()"/>
<div class="py-1 px-2 bg-100 small" t-esc="task._get_pad_content()"/>
</t>
</t>
<t t-else="">