mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add fix for empty descriptions
This commit is contained in:
parent
cf63c825d4
commit
1eae76fc15
1 changed files with 6 additions and 1 deletions
|
@ -184,7 +184,12 @@ def html_to_content(description_html)
|
|||
description_html = description_html.to_s
|
||||
description = description_html.gsub("<br>", "\n")
|
||||
description = description.gsub("<br/>", "\n")
|
||||
description = XML.parse_html(description).content.strip("\n ")
|
||||
|
||||
if description.empty?
|
||||
description = ""
|
||||
else
|
||||
description = XML.parse_html(description).content.strip("\n ")
|
||||
end
|
||||
end
|
||||
|
||||
return description_html, description
|
||||
|
|
Loading…
Reference in a new issue