OK, found a workaround, not clean but working, I added the following line to
/usr/lib/mozilla-1.4.1/defaults/autoconfig/prefcalls.js in the getLDAPValue
function:
start_pos +=1;
so now it removes the preblematic "white space" in front of my ldap fetched
variables.
Here's the whole function debuged by me using displayError function (don't know
a better way to debug :-( )
OK, found a workaround, not clean but working, I added the following line to mozilla- 1.4.1/defaults/ autoconfig/ prefcalls. js in the getLDAPValue
/usr/lib/
function:
start_pos +=1;
so now it removes the preblematic "white space" in front of my ldap fetched
variables.
Here's the whole function debuged by me using displayError function (don't know
a better way to debug :-( )
function getLDAPValue(str, key) {
try {
if (str == null || key == null)
return null;
var search_key = "\n" + key + "=";
var start_pos = str.indexOf( search_ key);
if (start_pos == -1)
return null;
start_pos += search_key.length;
//start
start_pos +=1;
//end
var end_pos = str.indexOf("\n", start_pos);
if (end_pos == -1)
end_pos = str.length;
var attrib = str.substring( start_pos, end_pos);
displayError( "Jehan \nattrib: "+attrib+ "\nstart_ pos:"+start_ pos+"\nend_ pos:"+end_ pos);
getLDAPValue:
return str.substring( start_pos, end_pos);
}
displayError( "getLDAPValue" , e);
catch(e) {
}
}
Is this a bug ? let me know ...