mirror of
https://github.com/iv-org/invidious.git
synced 2026-02-17 17:48:32 -06:00
Update src/invidious/videos/description.cr
Co-authored-by: Fijxu <fijxu@nadeko.net>
This commit is contained in:
parent
698cd49529
commit
44a5ea5eeb
@ -50,7 +50,8 @@ def parse_description(desc, video_id : String) : String?
|
||||
# Slightly faster than HTML.escape, as we're only doing one pass on
|
||||
# the string instead of five for the standard library
|
||||
return String.build do |str|
|
||||
copy_string(str, content.each_codepoint, utf16_length(content))
|
||||
content_size = content.ascii_only? ? content.size : utf16_length(content)
|
||||
copy_string(str, content.each_codepoint, content_size)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user