[FIX] payment_ogone: markupsafe HTML_ANSWER

This commit is contained in:
Xavier Morel
2021-07-20 05:37:41 +00:00
parent 16be2b0705
commit d60f73985b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import logging
import pprint
import re
import markupsafe
import werkzeug
from odoo import _, http
@@ -88,7 +89,7 @@ class OgoneController(http.Controller):
# The content of the HTML is not sanitized to preserve the redirection in the script.
# After redirection, the customer comes back to the directlink return URL and we proceed
# with the (now authenticated) payment request.
redirect_html = ustr(base64.b64decode(redirect_html_element.text))
redirect_html = markupsafe.Markup(ustr(base64.b64decode(redirect_html_element.text)))
return request.render(
'payment_ogone.directlink_feedback', {'redirect_html': redirect_html}
)
@@ -43,7 +43,7 @@
<template id="directlink_feedback" name="Payment processing page">
<t t-call="web.layout">
<t t-call-assets="web.assets_common"/>
<t t-raw="redirect_html"/>
<t t-out="redirect_html"/>
</t>
</template>