diff --git a/gene2phenotype_project/gene2phenotype_app/views/panel.py b/gene2phenotype_project/gene2phenotype_app/views/panel.py index d413230..cb42324 100644 --- a/gene2phenotype_project/gene2phenotype_app/views/panel.py +++ b/gene2phenotype_project/gene2phenotype_app/views/panel.py @@ -8,6 +8,7 @@ from django.db.models import Q import csv, gzip, tempfile, os from datetime import datetime +import re from gene2phenotype_app.models import (Panel, User, LocusGenotypeDisease, LGDVariantType, LGDVariantGenccConsequence, @@ -364,7 +365,7 @@ def PanelDownload(request, name): ).select_related('lgd__id').values('lgd__id', 'comment') for data in queryset_lgd_comment: - comment = data['comment'].strip() + comment = re.sub(r'[\n\r]+', '', data['comment']) if data['lgd__id'] not in lgd_comments: lgd_comments[data['lgd__id']] = [comment] else: