Right, HTML.

This commit is contained in:
Zergling_man 2021-10-29 05:53:01 +11:00
parent a6aa5f7b5d
commit b17c34142c

View File

@ -59,4 +59,5 @@ def book(bookurl):
def chapter(bookurl,chapnum):
book=models.Book.objects.filter(url=bookurl)[0]
chapter=models.Chapter.objects.filter(book=book,number=int(chapnum))[0]
text='<p>'+chapter.contents.replace('<','&lt;').replace('>','&gt;').replace('\n\n','</p><p>').replace('\n','<br/>')+'</p>'
return {'title':chapter,'content':'<p>Navigation buttons will come later...</p>\n'+chapter.contents,'date':chapter.added}