mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
- Correction d'erreur de syntaxe dans la composition d'expressions régulières
This commit is contained in:
parent
1228e42fc7
commit
dd5815ee8f
2 changed files with 5 additions and 5 deletions
|
@ -24,14 +24,14 @@ var LSformElement_text = new Class({
|
|||
getDependsFields: function(format) {
|
||||
var retval=new Array();
|
||||
var find = 1;
|
||||
var getMotif = /%{([A-Za-z0-9]+)}/
|
||||
var getMotif = new RegExp('%\{([A-Za-z0-9]+)\}');
|
||||
var ch = null;
|
||||
while (find) {
|
||||
ch = getMotif.exec(format);
|
||||
if ($type(ch)) {
|
||||
retval.include(ch[1]);
|
||||
format=format.replace (
|
||||
new RegExp('%{'+ch[1]+'}'),
|
||||
new RegExp('%\{'+ch[1]+'\}'),
|
||||
''
|
||||
);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ function LSdebug() {
|
|||
* @retval string La chaine formatée
|
||||
*/
|
||||
function getFData(format,data,meth) {
|
||||
var getMotif = /%{([A-Za-z0-9]+)}/
|
||||
var getMotif = new RegExp('%\{([A-Za-z0-9]+)\}');
|
||||
var find=1;
|
||||
if(($type(data)=='object') || ($type(data)=='array')) {
|
||||
if ($type(data[meth])!='function') {
|
||||
|
@ -42,7 +42,7 @@ function getFData(format,data,meth) {
|
|||
var ch = getMotif.exec(format);
|
||||
if ($type(ch)) {
|
||||
format=format.replace (
|
||||
new RegExp('%{'+ch[1]+'}'),
|
||||
new RegExp('%\{'+ch[1]+'\}'),
|
||||
data[ch[1]]
|
||||
);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ function getFData(format,data,meth) {
|
|||
if ($type(ch)) {
|
||||
try {
|
||||
format=format.replace (
|
||||
new RegExp('%{'+ch[1]+'}'),
|
||||
new RegExp('%\{'+ch[1]+'\}'),
|
||||
data[meth](ch[1])
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue