mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
support dynamic formatted attributes with dashes
This commit is contained in:
@@ -425,7 +425,11 @@ export class QWeb {
|
||||
}
|
||||
|
||||
if (name.startsWith("t-attf-")) {
|
||||
const attName = name.slice(7);
|
||||
let attName = name.slice(7);
|
||||
if (!attName.match(/^[a-zA-Z]+$/)) {
|
||||
// attribute contains 'non letters' => we want to quote it
|
||||
attName = '"' + attName + '"';
|
||||
}
|
||||
const formattedExpr = value!.replace(
|
||||
/\{\{.*?\}\}/g,
|
||||
s => "${" + this._formatExpression(s.slice(2, -2)) + "}"
|
||||
|
||||
Reference in New Issue
Block a user