master
Aevann1 2021-12-10 04:14:18 +02:00
parent 2b3cd29a64
commit 679c99e681
2 changed files with 2 additions and 5 deletions

View File

@ -161,10 +161,7 @@ def sanitize(sanitized, noimages=False):
sanitized = str(soup)
start = '<s>'
end = '</s>'
if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '<span class="spoiler">').replace(end, '</span>')
sanitized = re.sub('\|\|(.*?)\|\|', r'<span class="spoiler">\1</span>', sanitized)
for i in re.finditer("[^a]>\s*(:[!#]{0,2}\w+:\s*)+<\/", sanitized):
old = i.group(0)

View File

@ -133,7 +133,7 @@ You can use Markdown formatting:
</tr>
<tr>
<td>Spoilers</td>
<td>&lt;s&gt; bussy > gussy &lt;/s&gt;</td>
<td>||bussy > gussy||</td>
<td><p class="spoiler">bussy > gussy</p></td>
</tr>
<tr>