python3: get HTML parser from six transition module

This commit is contained in:
Frédéric Péters 2018-03-25 16:17:14 +02:00
parent 0ff596b5e6
commit d4346e2cfa
2 changed files with 2 additions and 2 deletions

View File

@ -699,7 +699,7 @@ class CellBase(models.Model):
}
if not self.is_relevant(context):
return ''
from HTMLParser import HTMLParser
from django.utils.six.moves.html_parser import HTMLParser
return HTMLParser().unescape(strip_tags(self.render(context)))
def get_external_links_data(self):

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from HTMLParser import HTMLParser
from django.utils.six.moves.html_parser import HTMLParser
from django.template.context import BaseContext
from django.utils.html import strip_tags