mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
Escape webnovel.com chapter texts for HTML (#216)
This commit is contained in:
parent
2d47a0aff6
commit
1a9f91cd04
1 changed files with 4 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ import logging
|
|||
import re
|
||||
import time
|
||||
import urllib2
|
||||
import cgi
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from base_adapter import BaseSiteAdapter
|
||||
|
|
@ -210,5 +212,6 @@ class WWWWebNovelComAdapter(BaseSiteAdapter):
|
|||
content = chapter_info['content']
|
||||
|
||||
# Turn raw chapter text into HTML
|
||||
content = content.replace('\r', '').replace('\n', '<br />')
|
||||
# Not sure if escaping quotes is actually useful, but rather do it than not
|
||||
content = cgi.escape(content, quote=True).replace('\r', '').replace('\n', '<br />')
|
||||
return content
|
||||
|
|
|
|||
Loading…
Reference in a new issue