这是indexloc提供的服务,不要输入任何密码
Skip to content

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

},
_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
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