How to handle the " ' " in UI as it does not make NXQL crash ?

Hello Nuxeo people,

I'm using the studio and in this case i'm focussed on the Content Model -> Structure Templates functionality.

My problem is if i want to create a document with a ' in it (for instance “L'école …“) i have to pass my document title as “L\'école …” if i don't want NXQL to crash when attempting to create the given document.

The result is an unwelcomed \ in the document title in the UI :(

Please, what can I do to make this kind of conversion transparent ?

Thank you !

Antoine

0 votes

1 answers

1096 views

ANSWER



OK,

It was all my mistake as I attached a trigger to workspace creation in that domain.

This trigger is using a NXQL query to determine whether a chain should run or not.

So this made my day:

Replace : SELECT * FROM Document WHERE ecm:path='@{sectionPath}'

With : SELECT * FROM Document WHERE ecm:path='@{sectionPath.replace(“'“, “\'“)}'

Cheers,

Antoine

0 votes