Explorar el Código

Added escaped page source in Meta page

master
Dirk Alders hace 1 mes
padre
commit
584d3d7eb9
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      pages/models.py

+ 2
- 1
pages/models.py Ver fichero

@@ -1,6 +1,7 @@
1 1
 from django.conf import settings
2 2
 from django.contrib.auth.models import User, Group
3 3
 from django.db import models
4
+from django.utils.html import escape
4 5
 from django.utils.translation import gettext as _
5 6
 from simple_history.models import HistoricalRecords
6 7
 
@@ -160,7 +161,7 @@ class PikiPage(models.Model):
160 161
         else:
161 162
             appendix = "<h1>" + _("Page source") + "</h1>\n"
162 163
             appendix += "<pre>\n"
163
-            appendix += self.page_txt
164
+            appendix += escape(self.page_txt)
164 165
             appendix += "</pre>\n"
165 166
 
166 167
         #

Loading…
Cancelar
Guardar