* fix for #13

* requirements.txt entry

* rm striptags + bleach configuration
This commit is contained in:
Vasiliy
2020-02-24 10:51:35 +03:00
committed by GitHub
parent a2d7371e00
commit ca8f782a41
3 changed files with 6 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ ALLOWED_HOSTS = ["127.0.0.1", "0.0.0.0", "vas3k.ru", "infomate.club"]
INSTALLED_APPS = [
"django.contrib.staticfiles",
"django.contrib.humanize",
"django_bleach",
"auth",
"boards",
"parsing"
@@ -122,6 +123,8 @@ TELEGRAM_APP_HASH = None # should set in private_settings.py
TELEGRAM_SESSION_FILE = None # should set in private settings.py
TELEGRAM_CACHE_SECONDS = 10 * 60 # 10 min
BLEACH_STRIP_TAGS = True
try:
# poor mans' private settings
# As due to obvious reasons this file is missing in the repository, suppress the following 'pyflakes' error codes:

View File

@@ -12,3 +12,4 @@ pyjwt>=1.7.1
nltk==3.4.5
newspaper3k>=0.2.8
telethon==1.10.10
django-bleach==0.6.1

View File

@@ -1,6 +1,7 @@
{% extends "layout.html" %}
{% load text_filters %}
{% load static %}
{% load bleach_tags %}
{% block title %}{{ board.curator_name }}{% if board.curator_title %} | {{ board.curator_title }}{% endif %} | {{ block.super }}{% endblock %}
@@ -68,7 +69,7 @@
<div class="articles feed-articles">
{% for article in articles %}
<div class="article {% if article.is_fresh %}is-article-fresh{% endif %}">
<div class="article-title">{{ article.icon|safe }}<a href="{{ article.url }}" target="_blank">{{ article.title|striptags }}</a></div>
<div class="article-title">{{ article.icon|safe }}<a href="{{ article.url }}" target="_blank">{{ article.title|bleach }}</a></div>
<a href="{{ article.url }}" class="article-tooltip" target="_blank">
{% if article.image %}
<img src="{{ article.image }}" alt="{{ article.title|striptags }}" class="article-tooltip-image">