Skip to content

Commit

Permalink
Fixed bug with outHtml::searchForm outputting double slash
Browse files Browse the repository at this point in the history
  • Loading branch information
jbogdani committed Oct 6, 2021
1 parent cee4d3b commit f6bb262
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/OutHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ public function searchForm()
<script>
$('#searchForm').submit(function(){
if($('#search').val() !== '' ){
window.location = $(this).data('path') + '/search:' + encodeURIComponent($('#search').val());
var path2root = $(this).data('path');
var searchStr = encodeURIComponent($('#search').val();
window.location = path2root + (path2root.endsWith('/') ? '' : '/') + 'search:' + searchStr);
}
});
</script>
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
5.8.1[] = "Fixed bug with outHtml::searchForm outputting double slash"
5.8.0[] = "Added support for the advanced query"
5.7.1[] = "Removed debugging error_log in template_ctrl"
5.7.0[] = "Changed format of logAttempts, and rised time buffer to 2 seconds"
Expand Down

0 comments on commit f6bb262

Please sign in to comment.