-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve 3.3.4 #195
resolve 3.3.4 #195
Conversation
textToDisplay = omsgs.viewingResultsFor.replace("_SEARCH_TEXT_", "'<b>"+sanitizeHtml(searchText)+"</b>'"); | ||
if($j.trim(searchText) == '') | ||
textToDisplay = omsgs.viewingAll; | ||
|
||
$j('#pageInfo').html(sanitizeHtml(textToDisplay)); | ||
|
||
if($j('#pageInfo').css("visibility") != 'visible') | ||
$j('#pageInfo').css("visibility", "visible"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation is off. Could you please adjust?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkorytkowski resolved
@@ -1075,14 +1075,16 @@ function OpenmrsSearch(div, showIncludeVoided, searchHandler, selectionHandler, | |||
return Math.ceil(this._table.fnSettings()._iDisplayStart / this._table.fnSettings()._iDisplayLength) + 1; | |||
}, | |||
_updatePageInfo: function(searchText) { | |||
textToDisplay = omsgs.viewingResultsFor.replace("_SEARCH_TEXT_", "'<b>"+searchText+"</b>'"); | |||
if ((/^[a-zA-Z0-9_\-]+$/.test(searchText))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it enough to sanitizeHtml? Why this "if"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rkorytkowski It wasn't when I tested. I still found the same issue. Secondly Its better handled at the generation point for the HTML than at the use level of the OpenmrsSearch function.
No description provided.