details:   https://code.tryton.org/tryton/commit/936431c951bb
branch:    default
user:      Cédric Krier <[email protected]>
date:      Mon Jul 06 09:07:08 2026 +0200
description:
        Permit __url__ and __href__ attribute usage in Genshi evaluation

        Closes #14932
diffstat:

 trytond/trytond/_safe_genshi.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r a05fa06b3a4c -r 936431c951bb trytond/trytond/_safe_genshi.py
--- a/trytond/trytond/_safe_genshi.py   Tue Jul 07 07:31:32 2026 +0200
+++ b/trytond/trytond/_safe_genshi.py   Mon Jul 06 09:07:08 2026 +0200
@@ -10,7 +10,8 @@
 
     def visit_Attribute(self, node):
         if (node.attr.startswith('_')
-                and node.attr not in {'__class__', '__name__'}):
+                and node.attr not in {
+                    '__class__', '__name__', '__url__', '__href__'}):
             raise ValueError(f"invalid attribute {node.attr!r}")
         return super().visit_Attribute(node)
 

Reply via email to