forked from mirrors/bookwyrm
Merge pull request #991 from bookwyrm-social/character-encoding
Fixes character encoding bug
This commit is contained in:
commit
cbdf573261
2 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% if rating %}
|
{% if rating %}
|
||||||
|
|
||||||
{% blocktrans with book_title=book.title display_rating=rating|floatformat:"0" review_title=name count counter=rating %}Review of "{{ book_title }}" ({{ display_rating }} star): {{ review_title }}{% plural %}Review of "{{ book_title }}" ({{ display_rating }} stars): {{ review_title }}{% endblocktrans %}
|
{% blocktrans with book_title=book.title|safe display_rating=rating|floatformat:"0" review_title=name|safe count counter=rating %}Review of "{{ book_title }}" ({{ display_rating }} star): {{ review_title }}{% plural %}Review of "{{ book_title }}" ({{ display_rating }} stars): {{ review_title }}{% endblocktrans %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% blocktrans with book_title=book.title review_title=name %}Review of "{{ book_title }}": {{ review_title }}{% endblocktrans %}
|
{% blocktrans with book_title=book.title|safe review_title=name|safe %}Review of "{{ book_title }}": {{ review_title }}{% endblocktrans %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -269,7 +269,7 @@ class Status(TestCase):
|
||||||
def test_review_to_pure_activity(self, *_):
|
def test_review_to_pure_activity(self, *_):
|
||||||
""" subclass of the base model version with a "pure" serializer """
|
""" subclass of the base model version with a "pure" serializer """
|
||||||
status = models.Review.objects.create(
|
status = models.Review.objects.create(
|
||||||
name="Review name",
|
name="Review's name",
|
||||||
content="test content",
|
content="test content",
|
||||||
rating=3.0,
|
rating=3.0,
|
||||||
user=self.local_user,
|
user=self.local_user,
|
||||||
|
@ -280,7 +280,7 @@ class Status(TestCase):
|
||||||
self.assertEqual(activity["type"], "Article")
|
self.assertEqual(activity["type"], "Article")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity["name"],
|
activity["name"],
|
||||||
'Review of "%s" (3 stars): Review name' % self.book.title,
|
'Review of "%s" (3 stars): Review\'s name' % self.book.title,
|
||||||
)
|
)
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "test content")
|
||||||
self.assertEqual(activity["attachment"][0].type, "Document")
|
self.assertEqual(activity["attachment"][0].type, "Document")
|
||||||
|
|
Loading…
Reference in a new issue