From 09356996f82a8cd55cac1f02daf89e3f9deb8433 Mon Sep 17 00:00:00 2001 From: trizen Date: Sun, 2 Aug 2020 14:11:22 +0300 Subject: Minor fix in the decoding of URLs in video description. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jesús --- lib/WWW/FairViewer/Utils.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/WWW/FairViewer/Utils.pm') diff --git a/lib/WWW/FairViewer/Utils.pm b/lib/WWW/FairViewer/Utils.pm index 852d870..5521a2e 100644 --- a/lib/WWW/FairViewer/Utils.pm +++ b/lib/WWW/FairViewer/Utils.pm @@ -474,6 +474,11 @@ sub get_description { } }segi; + # Decode hashtags + $desc =~ s{(.*?)}{ + $1 + }segi; + # Decode internal links to videos / playlists $desc =~ s{(https://www\.youtube\.com)/watch\?.*?}{ my $url = $2; @@ -482,7 +487,7 @@ sub get_description { }segi; $desc =~ s{
}{\n}gi; - $desc =~ s{(.*?)}{$1}sgi; + $desc =~ s{.*?}{$1}sgi; $desc =~ s/<.*?>//gs; $desc = HTML::Entities::decode_entities($desc); -- cgit v1.2.3