mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 03:41:53 +02:00
Etemplate: Avoid trying to process regexes by checking for end anchor
This commit is contained in:
parent
13842ffb79
commit
af4fcd7a2d
@ -207,7 +207,9 @@ var et2_arrayMgr = /** @class */ (function () {
|
|||||||
var is_index_in_content = _ident.charAt(0) == '@';
|
var is_index_in_content = _ident.charAt(0) == '@';
|
||||||
// Check whether "$" occurs in the given identifier
|
// Check whether "$" occurs in the given identifier
|
||||||
var pos_var = _ident.indexOf('$');
|
var pos_var = _ident.indexOf('$');
|
||||||
if (pos_var >= 0 && (this.perspectiveData.row != null || !_ident.match(/\$\{?row\}?/))) {
|
if (pos_var >= 0 && (this.perspectiveData.row != null || !_ident.match(/\$\{?row\}?/))
|
||||||
|
// Avoid messing with regex in validators
|
||||||
|
&& pos_var !== _ident.indexOf("$/")) {
|
||||||
// Get the content array for the current row
|
// Get the content array for the current row
|
||||||
var row = typeof this.perspectiveData.row == 'number' ? this.perspectiveData.row : '';
|
var row = typeof this.perspectiveData.row == 'number' ? this.perspectiveData.row : '';
|
||||||
var row_cont = this.data[row] || {};
|
var row_cont = this.data[row] || {};
|
||||||
|
@ -225,7 +225,10 @@ export class et2_arrayMgr
|
|||||||
|
|
||||||
// Check whether "$" occurs in the given identifier
|
// Check whether "$" occurs in the given identifier
|
||||||
const pos_var = _ident.indexOf('$');
|
const pos_var = _ident.indexOf('$');
|
||||||
if (pos_var >= 0 && (this.perspectiveData.row != null || !_ident.match(/\$\{?row\}?/))) {
|
if (pos_var >= 0 && (this.perspectiveData.row != null || !_ident.match(/\$\{?row\}?/))
|
||||||
|
// Avoid messing with regex in validators
|
||||||
|
&& pos_var !== _ident.indexOf("$/")
|
||||||
|
) {
|
||||||
// Get the content array for the current row
|
// Get the content array for the current row
|
||||||
const row = typeof this.perspectiveData.row == 'number' ? this.perspectiveData.row : '';
|
const row = typeof this.perspectiveData.row == 'number' ? this.perspectiveData.row : '';
|
||||||
const row_cont = this.data[row] || {};
|
const row_cont = this.data[row] || {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user