Try some escaping stuff with the feed
This commit is contained in:
parent
2838f73840
commit
414872730c
BIN
.feed.xml.swp
Normal file
BIN
.feed.xml.swp
Normal file
Binary file not shown.
149
feed.xml
Normal file
149
feed.xml
Normal file
|
@ -0,0 +1,149 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<rss version="2.0"
|
||||||
|
xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
|
||||||
|
>
|
||||||
|
|
||||||
|
<channel>
|
||||||
|
<title>Post::Text</title>
|
||||||
|
<link>http://localhost:3000/thread/list</link>
|
||||||
|
<description>In UTF-8 we trust. 🫡</description>
|
||||||
|
<lastBuildDate>Wed, 03 May 2023 14:05:24 EDT</lastBuildDate>
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/305</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">305</guid>
|
||||||
|
<pubDate>Wed, 3 May 2023 14:05:16 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/304</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">304</guid>
|
||||||
|
<pubDate>Wed, 3 May 2023 14:04:36 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/303</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">303</guid>
|
||||||
|
<pubDate>Wed, 3 May 2023 14:00:14 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/302</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">302</guid>
|
||||||
|
<pubDate>Wed, 3 May 2023 13:55:16 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/301</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">301</guid>
|
||||||
|
<pubDate>Fri, 28 Apr 2023 13:04:38 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/300</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">300</guid>
|
||||||
|
<pubDate>Fri, 28 Apr 2023 12:50:03 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/299</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">299</guid>
|
||||||
|
<pubDate>Fri, 28 Apr 2023 12:44:21 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/298</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">298</guid>
|
||||||
|
<pubDate>Wed, 26 Apr 2023 11:03:27 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/297</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">297</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 23:09:02 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/296</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">296</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 22:42:10 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/295</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">295</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 22:09:19 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/294</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">294</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 22:07:55 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/293</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">293</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 18:44:21 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/292</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">292</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 18:43:16 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<title>hi</title>
|
||||||
|
<link>http://localhost:3000/thread/single/291</link>
|
||||||
|
<description><p>ayy... lmao</p>
|
||||||
|
</description>
|
||||||
|
<author>Anonymous</author>
|
||||||
|
<guid isPermaLink="false">291</guid>
|
||||||
|
<pubDate>Tue, 25 Apr 2023 18:42:26 EDT</pubDate>
|
||||||
|
</item>
|
||||||
|
</channel>
|
||||||
|
</rss>
|
|
@ -3,6 +3,7 @@ package PostText::Controller::Thread;
|
||||||
use Mojo::Base 'Mojolicious::Controller', -signatures;
|
use Mojo::Base 'Mojolicious::Controller', -signatures;
|
||||||
use Date::Format;
|
use Date::Format;
|
||||||
use XML::RSS;
|
use XML::RSS;
|
||||||
|
use XML::Entities;
|
||||||
|
|
||||||
sub create($self) {
|
sub create($self) {
|
||||||
my $v;
|
my $v;
|
||||||
|
@ -105,6 +106,11 @@ sub feed($self) {
|
||||||
);
|
);
|
||||||
|
|
||||||
for my $thread (@{$threads}) {
|
for my $thread (@{$threads}) {
|
||||||
|
my $description =
|
||||||
|
XML::Entities::decode(
|
||||||
|
'all',
|
||||||
|
$self->markdown($self->truncate_text($thread->{'body'}))
|
||||||
|
);
|
||||||
my $item_link =
|
my $item_link =
|
||||||
$self->url_for(
|
$self->url_for(
|
||||||
single_thread => {thread_id => $thread->{'id'}}
|
single_thread => {thread_id => $thread->{'id'}}
|
||||||
|
@ -113,7 +119,7 @@ sub feed($self) {
|
||||||
$rss->add_item(
|
$rss->add_item(
|
||||||
title => $thread->{'title'},
|
title => $thread->{'title'},
|
||||||
link => $item_link,
|
link => $item_link,
|
||||||
description => $self->truncate_text($thread->{'body'}),
|
description => $description,
|
||||||
author => $thread->{'author'},
|
author => $thread->{'author'},
|
||||||
guid => $thread->{'id'},
|
guid => $thread->{'id'},
|
||||||
pubDate => $thread->{'date'}
|
pubDate => $thread->{'date'}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user