Private
Public Access
1
0

improved html tag stripping

This commit is contained in:
Sander Roosendaal
2018-12-12 10:34:12 +01:00
parent 3a06408d3f
commit 6da4c36c68
5 changed files with 17 additions and 4 deletions

View File

@@ -25,6 +25,8 @@ from rowers.models import (
from rowers.courses import get_time_course
from rowers.emails import htmlstrip,htmlstripnobr
import rowers.mytypes as mytypes
import metrics
@@ -616,6 +618,7 @@ def update_plannedsession(ps,cd):
def update_indoorvirtualrace(ps,cd):
for attr, value in cd.items():
if attr == 'comment':
value = htmlstripnobr(value)
value.replace("\r\n", "&#10");
value.replace("\n", "&#10");
setattr(ps, attr, value)
@@ -666,6 +669,7 @@ def update_indoorvirtualrace(ps,cd):
def update_virtualrace(ps,cd):
for attr, value in cd.items():
if attr == 'comment':
value = htmlstripnobr(value)
value.replace("\r\n", "&#10");
value.replace("\n", "&#10");
setattr(ps, attr, value)