diff --git a/.feed.xml.swp b/.feed.xml.swp new file mode 100644 index 0000000..e4925f5 Binary files /dev/null and b/.feed.xml.swp differ diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..0b72d45 --- /dev/null +++ b/feed.xml @@ -0,0 +1,149 @@ + + + + + +Post::Text +http://localhost:3000/thread/list +In UTF-8 we trust. 🫡 +Wed, 03 May 2023 14:05:24 EDT + + +hi +http://localhost:3000/thread/single/305 +<p>ayy... lmao</p> + +Anonymous +305 +Wed, 3 May 2023 14:05:16 EDT + + +hi +http://localhost:3000/thread/single/304 +<p>ayy... lmao</p> + +Anonymous +304 +Wed, 3 May 2023 14:04:36 EDT + + +hi +http://localhost:3000/thread/single/303 +<p>ayy... lmao</p> + +Anonymous +303 +Wed, 3 May 2023 14:00:14 EDT + + +hi +http://localhost:3000/thread/single/302 +<p>ayy... lmao</p> + +Anonymous +302 +Wed, 3 May 2023 13:55:16 EDT + + +hi +http://localhost:3000/thread/single/301 +<p>ayy... lmao</p> + +Anonymous +301 +Fri, 28 Apr 2023 13:04:38 EDT + + +hi +http://localhost:3000/thread/single/300 +<p>ayy... lmao</p> + +Anonymous +300 +Fri, 28 Apr 2023 12:50:03 EDT + + +hi +http://localhost:3000/thread/single/299 +<p>ayy... lmao</p> + +Anonymous +299 +Fri, 28 Apr 2023 12:44:21 EDT + + +hi +http://localhost:3000/thread/single/298 +<p>ayy... lmao</p> + +Anonymous +298 +Wed, 26 Apr 2023 11:03:27 EDT + + +hi +http://localhost:3000/thread/single/297 +<p>ayy... lmao</p> + +Anonymous +297 +Tue, 25 Apr 2023 23:09:02 EDT + + +hi +http://localhost:3000/thread/single/296 +<p>ayy... lmao</p> + +Anonymous +296 +Tue, 25 Apr 2023 22:42:10 EDT + + +hi +http://localhost:3000/thread/single/295 +<p>ayy... lmao</p> + +Anonymous +295 +Tue, 25 Apr 2023 22:09:19 EDT + + +hi +http://localhost:3000/thread/single/294 +<p>ayy... lmao</p> + +Anonymous +294 +Tue, 25 Apr 2023 22:07:55 EDT + + +hi +http://localhost:3000/thread/single/293 +<p>ayy... lmao</p> + +Anonymous +293 +Tue, 25 Apr 2023 18:44:21 EDT + + +hi +http://localhost:3000/thread/single/292 +<p>ayy... lmao</p> + +Anonymous +292 +Tue, 25 Apr 2023 18:43:16 EDT + + +hi +http://localhost:3000/thread/single/291 +<p>ayy... lmao</p> + +Anonymous +291 +Tue, 25 Apr 2023 18:42:26 EDT + + + \ No newline at end of file diff --git a/lib/PostText/Controller/Thread.pm b/lib/PostText/Controller/Thread.pm index b9b1087..8f0b142 100644 --- a/lib/PostText/Controller/Thread.pm +++ b/lib/PostText/Controller/Thread.pm @@ -3,6 +3,7 @@ package PostText::Controller::Thread; use Mojo::Base 'Mojolicious::Controller', -signatures; use Date::Format; use XML::RSS; +use XML::Entities; sub create($self) { my $v; @@ -105,7 +106,12 @@ sub feed($self) { ); for my $thread (@{$threads}) { - my $item_link = + my $description = + XML::Entities::decode( + 'all', + $self->markdown($self->truncate_text($thread->{'body'})) + ); + my $item_link = $self->url_for( single_thread => {thread_id => $thread->{'id'}} )->to_abs; @@ -113,7 +119,7 @@ sub feed($self) { $rss->add_item( title => $thread->{'title'}, link => $item_link, - description => $self->truncate_text($thread->{'body'}), + description => $description, author => $thread->{'author'}, guid => $thread->{'id'}, pubDate => $thread->{'date'}