Merge #19203 Fix Query Generator single quotes and backslashes
- Closes #19203 Hello 👋 This PR fixes the generated query when the criteria text contains single quotes or backslashes. For now it only escapes the first `single quote` and the first `backslash`, which generates an invalid query.  After merging this PR it will escape all the `single quotes` and all the `backslashes`.  - phpMyAdmin version: 5.2.2-dev, 6.0.0-dev Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
commit
c8525a89d8
@ -438,7 +438,7 @@ Functions.escapeBacktick = function (s) {
|
||||
* @return {string}
|
||||
*/
|
||||
Functions.escapeSingleQuote = function (s) {
|
||||
return s.replace('\\', '\\\\').replace('\'', '\\\'');
|
||||
return s.replaceAll('\\', '\\\\').replaceAll('\'', '\\\'');
|
||||
};
|
||||
|
||||
Functions.sprintf = function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user