Ryan Barrett 2023-03-05 07:52:56 -08:00
rodzic 7759ebcdae
commit 41f26e2be3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -150,6 +150,9 @@ def feed(domain):
}
title = f'Bridgy Fed feed for {domain}'
# TODO: inject/merge common.pretty_link into microformats2.render_content
# (specifically into hcard_to_html) somehow to convert Mastodon URLs to @-@
# syntax. maybe a fediverse kwarg down through the call chain?
if format == 'html':
entries = [microformats2.object_to_html(a) for a in activities]
return render_template('feed.html', util=util, **locals())

Wyświetl plik

@ -20,7 +20,7 @@ EXPECTED_HTML = """\
<article class="h-entry">
<span class="p-uid">tag:fake.com:123456</span>
<time class="dt-published" datetime="2012-12-05T00:58:26+00:00">2012-12-05T00:58:26+00:00</time>
<a class="u-url" href="https://fake.com/123456">https://fake.com/123456</a>
<a class="u-url" href="https://fake.com/123456">fake.com/123456</a>
<div class="e-content p-name">
A reply
</div>
@ -60,7 +60,7 @@ class RenderTest(testutil.TestCase):
self.assertEqual(200, resp.status_code)
expected = EXPECTED_HTML.replace(
'\n<meta http-equiv="refresh" content="0;url=https://fake.com/123456">', ''
).replace('<a class="u-url" href="https://fake.com/123456">https://fake.com/123456</a>', '')
).replace('<a class="u-url" href="https://fake.com/123456">fake.com/123456</a>', '')
self.assert_multiline_equals(expected, resp.get_data(as_text=True),
ignore_blanks=True)