Bug - Path String

Status
Not open for further replies.

SWSDEV

Forum User
Joined
Feb 23, 2008
Messages
256
Reaction score
0
I took the project variable and put a path to a folder in it. When I used it had changed as follows.

The original: C:\ProgramData\3CX\Data\Work Order Audio
Changed to: C:ProgramDataCXDataWork Order Audio


After I escaped the backslash '\\' it worked. I can't imagine too many non-programmers would think to try that.
 
Hi,

If you're using a string with quotes, then you need to escape special characters. The string you enter is a javascript expression, so you need to escape characters as backslash, quotes, etc. This is not a bug, this is by design.

Maybe we should offer a button or something to quicly enter a string literal, and then we escape it for you. But the string that will be entered as value for the expression will have the escaping characters.

Regards,
 
Maybe even validate string literals for special characters when the text box control loses focus.
 
The problem is that you may want to add some special character. For example, you may want a TAB, and then enter \t, but if we escape that automatically, that would become \\t, and that's not what the user wanted originally. So, in order to enter a string literal, we could offer a dialog to enter it, but the user would have to say "I want a string literal", and then we escape it automatically. We cannot do that in every case without asking the user...
 
Maybe pop up the dialog if you detect a special character?
 
I'm thinking on a toggle button on the right of each text box. Something like the button to show or hide characters in a password text box (you can see that in the admin interface of 3CX). When it's pressed, the user enters a string literal, and when it's not pressed, the user enters an expression.

We need to discuss the best metaphor to use, and then implement the change...
 
Status
Not open for further replies.

Forum statistics

Threads
112,320
Messages
591,873
Members
165,466
Latest member
EMMEPICASA