Problems with "[" and "]" characters... - Forum

Forum Navigation
Climate strike banner
You need to log in to create posts and topics.

Problems with "[" and "]" characters...

i have made a website like google keep (not ready yet)

at this address you can see (it's in Persian): https://upnote.ir

when i want to save a note to database which have "[" or "]" characters whole app will crash!

i tried to replace them with another character but no lock...

how to deal with this problem?

@noyzen

when i want to save a note to database which have "[" or "]" characters whole app will crash!

I suspect this is because VisualNEOWeb assumes that the characters between the [ and the ] form a variable name.

i tried to replace them with another character but no lock...
how to deal with this problem?

I can't really suggest anything without looking at the details of the offending command ... please post the exact command/parameters (and details of any referenced data/variables.

look at this:

neoPhpExecSql "upnote" "new_note" "[new_note_content]" ""

the variable is a simple text input, for example if i try to type [DEMO] and save to database everything will be ok and word will be saved as it is

but when app wants to read it from database everythin crash... or words in "[]" doesn't show at all

i just looked in Chrome consol log and seems like app can read data correctly from database.

problem is about displaying it in app...

so, data will be saved - app can read data back from database - displaying will fail.

@noyzen, not sure why it's happening.
Using neoTable updates works fine, as you can check in this sample app.
Perhaps you can replace those characters for an special character combination before storing them in the database and replace that combination once you have read it back again.
Another possibility is to restrict those characters so they can't be used with slAllowedChars command.
Anyway will try to investigate it.

@noyzen, I think @gaev is right.
Try adding this CSS class to the object where you are trying to show the data:

ng-non-bindable

1 Click on the object
2 Properties panel > Advanced > css-class

This will tell VisualNEO Web not to process the "[" and "]" characters as variable delimiters.
Please let me know if it works for you.

Hi Luis,

Perhaps you can replace those characters for an special character combination before storing them in the database and replace that combination once you have read it back again.

i have tried this, not working. you can replace this characters using StrReplace

second option is not good because someone may need to use "[]" character to store some note...
they should be able to use any characters.

Thank you for checking

@noyzen I think you have not seen my previous comment due to both of us writing at the very same time :)

Oh sorry... i didn't see last comment like you said

and YES! P E R F E C T

That simply solved problem with "[]" characters!
https://upnote.ir (simple online notebook) you can check it here on my first php mysql app.

Thank you very much again for help @luishp @gaev :)


now i have to add it everywhere on lot of objects, is it good idea to make an option in properties panel in next update of app builder?