Ignore extensions from the current path when using custom search.

Created on 17 June 2020, about 4 years ago
Updated 17 May 2023, about 1 year ago

Paths with file extensions do not go to the search page. For example my path is http://example.com/test-this.pdf - I am not getting into this if statement if ($current_path == "/" . $keys || $current_path == "/" . $search_keys) because at this point my $current_path is test-this.pdf, my $keys are "test this pdf", and my $search_keys are "test-this-pdf" -- I then added "pdf" to the list of ignored extensions. So then my $current_path becomes test-this.pdf, my $keys are "test this", and my $search_keys are "test-this" -- so in either case, I'm not getting into that if statement. I am attaching a patch that will strip the excluded extensions from the $current_path in order to get by this.

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada porchlight

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024