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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags with dashes not working #128

Open
3 tasks done
timonsky opened this issue Oct 11, 2023 · 1 comment 路 May be fixed by #129
Open
3 tasks done

Tags with dashes not working #128

timonsky opened this issue Oct 11, 2023 · 1 comment 路 May be fixed by #129
Labels

Comments

@timonsky
Copy link

timonsky commented Oct 11, 2023

use GitHub reactions 馃憤 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

  • I have searched the issuetracker if the issue is not already reported.
  • This is not a feature request
  • This is not an image-provider request

Describe the bug:
Using keywords that contain dashes ('-') does not work. It seems the dashes are stripped before being passed to the URL builder.

To Reproduce:
Steps to reproduce the behavior:

  1. Go to the Splash section in admin theming
  2. enter a keyword containing dashes (eg. 'picos-de-europa')
  3. reload the page
  4. right-clicking in the browser where the picture is visible (for me it was in the empty space next to the app tray; at the very edge should also work)
  5. getting the url from the 'Copy Image Link' shows that the url called is https://source.unsplash.com/featured/1920x1080?picosdeeuropa as in the tag had the dashes stripped

Expected behavior:
Images should be taken from the tag containing dashes (e.g. https://source.unsplash.com/featured/1920x1080?picos-de-europa)

Server:

  • Nextcloud version: 27.0.1
  • Splash-App version: 2.2.1

Additional Information:

  • Might be related to Tags containing umlaut characters not working聽#125
  • with the tag 'picos-de-europa' it's especially noticeable as the tag 'picosdeeuropa' only has one image associated compared to 10k for the dashed one
  • 'aurora-borealis' vs 'auroraborealis' is another example
@timonsky timonsky added the bug label Oct 11, 2023
@timonsky
Copy link
Author

timonsky commented Oct 11, 2023

guessing it's this line that's responsible

Line 116 in lib/ProviderHandler/Provider.php
$term = preg_replace('/[^a-z]/i','', $term);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant