Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
54fe49f3
Commit
54fe49f3
authored
9 months ago
by
Tomi Valentová
Browse files
Options
Downloads
Patches
Plain Diff
escape json dump from fullcalendar
parent
a67d1b1d
No related branches found
No related tags found
2 merge requests
!1118
escape json dump from fullcalendar
,
!1117
escape json dump from fullcalendar
Pipeline
#19520
passed
9 months ago
Stage: build
Changes
3
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
calendar_utils/models.py
+2
-1
2 additions, 1 deletion
calendar_utils/models.py
district/models.py
+3
-3
3 additions, 3 deletions
district/models.py
district/templates/district/district_calendar_page.html
+10
-8
10 additions, 8 deletions
district/templates/district/district_calendar_page.html
with
15 additions
and
12 deletions
calendar_utils/models.py
+
2
−
1
View file @
54fe49f3
...
...
@@ -8,6 +8,7 @@ from django.core.serializers.json import DjangoJSONEncoder
from
django.core.validators
import
URLValidator
,
ValidationError
from
django.db
import
models
,
transaction
from
django.utils.timezone
import
now
from
django.utils.html
import
escape
from
.icalevents
import
icalevents
from
.parser
import
process_event_list
...
...
@@ -132,7 +133,7 @@ class CalendarMixin(models.Model):
calendar_format_events
.
append
(
parsed_event
)
return
json
.
dumps
(
calendar_format_events
)
return
escape
(
json
.
dumps
(
calendar_format_events
)
)
def
save
(
self
,
*
args
,
**
kwargs
):
# create or update related Calendar
...
...
This diff is collapsed.
Click to expand it.
district/models.py
+
3
−
3
View file @
54fe49f3
...
...
@@ -808,12 +808,12 @@ class DistrictCenterPage(
desc
=
None
if
self
.
perex
:
if
hasattr
(
self
,
"
perex
"
)
and
self
.
perex
:
desc
=
self
.
perex
elif
self
.
text
:
elif
hasattr
(
self
,
"
text
"
)
and
self
.
text
:
desc
=
trim_to_length
(
strip_all_html_tags
(
self
.
text
))
return
desc
return
""
class
DistrictNewProgramPage
(
MainProgramPageMixin
):
...
...
This diff is collapsed.
Click to expand it.
district/templates/district/district_calendar_page.html
+
10
−
8
View file @
54fe49f3
...
...
@@ -5,6 +5,7 @@
{% endblock %}
{% block inner_content %}
<div
class=
"container--wide"
>
<div
class=
"__js-root __inner-content"
>
<ui-full-calendar
{%
if
page.calendar_url
%}
...
...
@@ -14,4 +15,5 @@
{%
endif
%}
></ui-full-calendar>
</div>
</div>
{% endblock %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment