Commit 0fff0b76780df8faf81963046d0587615805c53a
1 parent
b2ded08a
KTS-4109 - Special characters cause problems when sent as part of the ajax url i…
…n windows, moved them into the ajax request as a parameter. "CLONE -"Parse" for the search critera crashes when I have a field with a special char(SUP-1588)" Fixed. Committed by: Megan Watson Reviewed by: Kevin Cyster
Showing
1 changed file
with
10 additions
and
4 deletions
templates/ktcore/search2/adv_query_search.smarty
| ... | ... | @@ -45,7 +45,7 @@ var gotSearchParseStatus = function callBack(o) |
| 45 | 45 | { |
| 46 | 46 | actionAfterParse = 'saveCompleted'; |
| 47 | 47 | var txtQuery = document.getElementById('txtAdvQuery'); |
| 48 | - url='{/literal}{$rootUrl}{literal}/search2/ajax/saveExpr.php?iSavedId={/literal}{$iSavedSearchId}{literal}&txtQuery='+txtQuery.value; | |
| 48 | + url='{/literal}{$rootUrl}{literal}/search2/ajax/saveExpr.php?iSavedId={/literal}{$iSavedSearchId}{literal}'; | |
| 49 | 49 | //alert(url); |
| 50 | 50 | |
| 51 | 51 | Ext.Ajax.request( |
| ... | ... | @@ -53,7 +53,10 @@ var gotSearchParseStatus = function callBack(o) |
| 53 | 53 | url: url, |
| 54 | 54 | method: 'GET', |
| 55 | 55 | success:gotSearchParseStatus, |
| 56 | - failure:gotNoStatus | |
| 56 | + failure:gotNoStatus, | |
| 57 | + params: { | |
| 58 | + txtQuery: txtQuery.value | |
| 59 | + } | |
| 57 | 60 | }); |
| 58 | 61 | |
| 59 | 62 | } |
| ... | ... | @@ -89,14 +92,17 @@ function startParsing() |
| 89 | 92 | return; |
| 90 | 93 | } |
| 91 | 94 | var txtQuery = document.getElementById('txtAdvQuery'); |
| 92 | - url='{/literal}{$rootUrl}{literal}/search2/ajax/parseExpr.php?txtQuery='+txtQuery.value; | |
| 95 | + url='{/literal}{$rootUrl}{literal}/search2/ajax/parseExpr.php'; | |
| 93 | 96 | |
| 94 | 97 | Ext.Ajax.request( |
| 95 | 98 | { |
| 96 | 99 | url: url, |
| 97 | 100 | method: 'GET', |
| 98 | 101 | success:gotSearchParseStatus, |
| 99 | - failure:gotNoStatus | |
| 102 | + failure:gotNoStatus, | |
| 103 | + params: { | |
| 104 | + txtQuery: txtQuery.value | |
| 105 | + } | |
| 100 | 106 | }); |
| 101 | 107 | } |
| 102 | 108 | function butParseClick() | ... | ... |