mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-20 13:14:32 -05:00
Fix broken hashtag links
This commit is contained in:
parent
4434889270
commit
6a02dd8842
@ -602,9 +602,11 @@ def content_to_comment_html(content)
|
|||||||
text = %(<a href="/watch?v=#{video_id}">#{"youtube.com/watch?v=#{video_id}"}</a>)
|
text = %(<a href="/watch?v=#{video_id}">#{"youtube.com/watch?v=#{video_id}"}</a>)
|
||||||
end
|
end
|
||||||
elsif url = run.dig?("navigationEndpoint", "commandMetadata", "webCommandMetadata", "url").try &.as_s
|
elsif url = run.dig?("navigationEndpoint", "commandMetadata", "webCommandMetadata", "url").try &.as_s
|
||||||
if text.starts_with?(/\s?@/)
|
if text.starts_with?(/\s?[@#]/)
|
||||||
# Handle "pings" in comments differently
|
# Handle "pings" in comments and hasthags differently
|
||||||
# See: https://github.com/iv-org/invidious/issues/3038
|
# See:
|
||||||
|
# - https://github.com/iv-org/invidious/issues/3038
|
||||||
|
# - https://github.com/iv-org/invidious/issues/3062
|
||||||
text = %(<a href="#{url}">#{text}</a>)
|
text = %(<a href="#{url}">#{text}</a>)
|
||||||
else
|
else
|
||||||
text = %(<a href="#{url}">#{reduce_uri(url)}</a>)
|
text = %(<a href="#{url}">#{reduce_uri(url)}</a>)
|
||||||
|
Loading…
Reference in New Issue
Block a user