Formula needs to be escaped

Description

The escaping problem doesn't appear in all environments, so we need to investigate the following conditions:

  • Is "Plugin Safe Mode" enabled?

  • Is another plugin overriding jQuery's $ operator? Is seems like $label.val() returns a wrong value, because there the message "If you intend to change the label, please use &CHLBL" which shouldn't happen here.

  • Is the encoding UTF-8? Between the browser and the server? What about the database encoding (SHOW CLIENT_ENCODING; SHOW SERVER_ENCODING; ) ?

  • Does it come from an unexpected user operation, such as triple-clicking to open the dialog or similar situations? It could alter the way jQuery finds the element. Ask the user to execute the following js before validating: $(".contents .column-name").length + ' ' + $(".contents .column-name").val() + '\n' + $(".contents .column-formula").length + ' ' + $(".contents .column-formula").val()

Any comment is welcome. We couldn't reproduce.

Environment

Chrome

Observations

Some users had a problem when submitting formulas. The formula wasn't saved or an error message would appear.

If you enter
\= test1.name where test1.\"ID\" \= test1name

the formular works as expected

Also:
(select test1.name from test1 where test1.\"ID\" \= test1name)

If you look at the formular after saving, the \ are removed - but
if you modify the formular, you have to escape " and = again.

Requirement Yogi

Activity

Show:
Resolved

Details

Assignee

Reporter

Fix versions

Affects versions

Requirement Yogi

Created February 3, 2014 at 11:42 AM
Updated October 3, 2019 at 11:10 AM
Resolved May 1, 2014 at 10:52 AM