mirror of
https://github.com/iv-org/invidious.git
synced 2024-10-01 01:25:56 -04:00
Add fix for empty descriptions
This commit is contained in:
parent
cf63c825d4
commit
1eae76fc15
@ -184,8 +184,13 @@ def html_to_content(description_html)
|
|||||||
description_html = description_html.to_s
|
description_html = description_html.to_s
|
||||||
description = description_html.gsub("<br>", "\n")
|
description = description_html.gsub("<br>", "\n")
|
||||||
description = description.gsub("<br/>", "\n")
|
description = description.gsub("<br/>", "\n")
|
||||||
|
|
||||||
|
if description.empty?
|
||||||
|
description = ""
|
||||||
|
else
|
||||||
description = XML.parse_html(description).content.strip("\n ")
|
description = XML.parse_html(description).content.strip("\n ")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return description_html, description
|
return description_html, description
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user