Skip to content

Commit 6c12224

Browse files
committed
Update regex reduce_uri utils
Follow this comment : #2936 (comment)
1 parent 68ac18d commit 6c12224

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/invidious/helpers/utils.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def fetch_random_instance
367367
end
368368

369369
def reduce_uri(uri : URI | String, max_length : Int32 = 50, suffix : String = "") : String
370-
str = uri.to_s.sub(/https?:\/\//, "")
370+
str = uri.to_s.sub(/^https?:\/\//, "")
371371
if str.size > max_length
372372
str = "#{str[0, max_length]}#{suffix}"
373373
end

0 commit comments

Comments
 (0)