Skip to content

Commit f936540

Browse files
committed
[smarcet] - #13961
* fixed json encoding issue
1 parent 9a409ae commit f936540

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

summit/code/infrastructure/active_records/events/SummitEvent.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public function getTitleJson(){
9999
return json_encode($this->Title);
100100
}
101101

102+
public function getSocialSummaryJson(){
103+
return json_encode($this->SocialSummary);
104+
}
105+
102106
public function getSummitTitle()
103107
{
104108
return $this->Summit->Title;

summit/templates/Layout/SummitAppSchedPage_globalSearchResults.ss

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@
149149
<% loop EventResults %>
150150
var event_{$ID} = {
151151
id : {$ID},
152-
title : "{$Title.JS}",
153-
abstract : "{$Abstract.JS}",
152+
title : {$TitleJson},
153+
abstract : {$AbstractJson},
154154
date_nice : "{$StartDate().Format(D j)}",
155155
start_datetime : "{$StartDate}",
156156
end_datetime : "{$EndDate}",
@@ -192,17 +192,14 @@
192192
<% end_if %>
193193
],
194194
url: "{$getLink(show)}",
195-
social_summary : "{$SocialSummary.JS}",
195+
social_summary : {$SocialSummaryJson},
196196
summit_id: {$Summit.ID},
197197
};
198198
summit.events.push(event_{$ID});
199199
summit.dic_events[{$ID}] = event_{$ID};
200200
<% end_loop %>
201201

202-
</script>
203-
204202

205-
<script type="text/javascript">
206203
window.ReactScheduleGridProps = {
207204
ScheduleProps : {
208205
month: "{$Summit.Month}",

0 commit comments

Comments
 (0)