In I2B2 platform, drag a node with a single quote in its value e.g. "... Alzheimer's disease" and drop it into the first panel (left one of the three), and click on run the query button, we would get an error.
By looking into the code, it turns out that SqlClauseUtil.java caused the issue.
In that file, a call to JDBCUtil.escapeSingleQuote(...) doesn't escape all single quotes, which caused subsequent SQL syntax issue.
A proposed solution is to update the escapeSingleQuote call to handle the unescaped single quote explicitly.
In I2B2 platform, drag a node with a single quote in its value e.g. "... Alzheimer's disease" and drop it into the first panel (left one of the three), and click on run the query button, we would get an error.
By looking into the code, it turns out that SqlClauseUtil.java caused the issue.
In that file, a call to JDBCUtil.escapeSingleQuote(...) doesn't escape all single quotes, which caused subsequent SQL syntax issue.
A proposed solution is to update the escapeSingleQuote call to handle the unescaped single quote explicitly.