Skip to content

Commit f6461d5

Browse files
committed
Added html escaping of initial text-area content in a view function to avoid mangling.
- Legacy-Id: 15989
1 parent 2b811b3 commit f6461d5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ietf/ipr/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from django.http import HttpResponse, Http404, HttpResponseRedirect
1313
from django.shortcuts import render, get_object_or_404, redirect
1414
from django.template.loader import render_to_string
15+
from django.utils.html import escape
1516

1617
import debug # pyflakes:ignore
1718

@@ -591,9 +592,9 @@ def notify(request, id, type):
591592

592593
else:
593594
if type == 'update':
594-
initial = [ {'type':'update_notify','text':m} for m in get_update_submitter_emails(ipr) ]
595+
initial = [ {'type':'update_notify','text':escape(m)} for m in get_update_submitter_emails(ipr) ]
595596
else:
596-
initial = [ {'type':'msgout','text':m} for m in get_posted_emails(ipr) ]
597+
initial = [ {'type':'msgout','text':escape(m)} for m in get_posted_emails(ipr) ]
597598
formset = NotifyFormset(initial=initial)
598599

599600
return render(request, "ipr/notify.html", {

0 commit comments

Comments
 (0)