Compare commits

..

6 Commits

Author SHA1 Message Date
Samantaz Fox 37e60ceca6
Merge d3bff46fe0 into eda7444ca4 2024-04-27 21:21:41 +00:00
Samantaz Fox d3bff46fe0
Search: Change smart search inhibitor to a backslash 2024-04-27 23:21:27 +02:00
Samantaz Fox 441ea8937a
Misc: Clean some code in UrlSanitizer 2024-04-27 23:18:29 +02:00
Samantaz Fox 9d115d8223
Search: Add URL search inhibition logic 2024-04-27 23:18:29 +02:00
Samantaz Fox 96cf6402fe
Search: Add support for youtu.be and youtube.com URLs 2024-04-27 23:18:29 +02:00
Samantaz Fox 0249f03360
Add a youtube URL sanitizer 2024-04-27 23:18:29 +02:00
1 changed files with 2 additions and 2 deletions

View File

@ -58,9 +58,9 @@ module Invidious::Search
# Remove surrounding whitespaces. Mostly useful for copy/pasted URLs.
@raw_query = _raw_query.strip
# Check for smart features (ex: URL search) inhibitor (exclamation mark).
# Check for smart features (ex: URL search) inhibitor (backslash).
# If inhibitor is present, remove it.
if @raw_query.starts_with?('!')
if @raw_query.starts_with?('\\')
@inhibit_ssf = true
@raw_query = @raw_query[1..]
end