Closed astirpe closed 7 months ago
What do you mean by 'returns a markup' ?
If I look at what I think is the super function of the one you're modifying (I'm not 100% sure because there are several in ir_qweb_fields.py
), and I naively run the code in Odoo shell, then I get this:
>>> from odoo.tools import pycompat, html_escape
>>> html_escape(pycompat.to_text('a & b'))
'a & b'
>>> str(html_escape(pycompat.to_text('a & b')))
'a & b'
I don't see a difference between before and after str()
- both results are strings.
@thomaspaulb did you try with the steps to reproduce?
@astirpe Not yet, but I believe you that I can reproduce it functionally that way. Before I go into the trouble of replicating the setup and setting a breakpoint to get the answer to my question, I'd ask you first. So, what do you mean by "returns a markup" ?
@thomaspaulb it means that returns a type "Markup" instead of "String".
Hi @hbrunn. Your command failed:
Required option bumpversion_mode for command merge. Possible values : major, minor, patch, nobump
.
Ocabot commands
ocabot merge major|minor|patch|nobump
ocabot rebase
ocabot migration {MODULE_NAME}
More information
/ocabot merge patch
What a great day to merge this nice PR. Let's do it! Prepared branch 16.0-ocabot-merge-pr-398-by-hbrunn-bump-patch, awaiting test results.
Congratulations, your PR was merged at c356ef49ffccb4909f02d57847baa1e8972942ed. Thanks a lot for contributing to OCA. ❤️
When an account has an "&" character in its name, the XAF auditfile export fails.
Here are 2 different errors I was able to reproduce:
b'xmlParseEntityRef: no name'
(probably the one described in https://github.com/OCA/l10n-netherlands/issues/397)b"EntityRef: expecting ';'"
Steps to reproduce:
l10n_nl
110000 Debiteuren
(that for sure is listed in the auditfile), for example name it: "Debiteuren & test"After some investigations, it seems that
value_to_html()
returns a markup instead of a string. This seems making theetree.XMLParser()
unhappy in case of any "&" character present. Converting the markup to string solves the issue. Not sure if there's a better way to solve it.