Skip to content
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

Merged
merged 2 commits into from
Sep 30, 2024
Merged

resolve 3.3.4 #195

merged 2 commits into from
Sep 30, 2024

Conversation

slubwama
Copy link
Contributor

No description provided.

Comment on lines 1079 to 1086
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");
Copy link
Member

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?

Copy link
Contributor Author

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))) {
Copy link
Member

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"?

Copy link
Contributor Author

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.

@dkayiwa dkayiwa merged commit f29296d into openmrs:master Sep 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants