Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Fixed variable output in JS templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvuckovic authored and Ulrich Boehm committed Apr 2, 2019
1 parent 6cd28b8 commit b99cad2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Expand Up @@ -27,16 +27,16 @@
<fieldset>
<legend><span>{{ 'Basic information' | Translate }}</span></legend>
<label>{{ 'Title' | Translate }}:</label>
<p class="Value">{{ CalEvent.title | safe }}</p>
<p class="Value">{{ CalEvent.title }}</p>
<div class="Clear"></div>
{% if CalEvent.description %}
<label>{{ 'Description' | Translate }}:</label>
<p class="Value">{{ CalEvent.description | safe }}</p>
<p class="Value">{{ CalEvent.description }}</p>
<div class="Clear"></div>
{% endif %}
{% if CalEvent.location %}
<label>{{ 'Location' | Translate }}:</label>
<p class="Value">{{ CalEvent.location | safe }}</p>
<p class="Value">{{ CalEvent.location }}</p>
<div class="Clear"></div>
{% endif %}
<label>{{ 'Calendar' | Translate }}:</label>
Expand All @@ -52,17 +52,17 @@
<fieldset>
<legend><span>{{ 'Resource' | Translate }}</span></legend>
<label>{{ 'Team' | Translate }}:</label>
<p class="Value"> {{ CalEvent.teamNames | replace('\\n', '<br>') | safe }}</p>
<p class="Value"> {{ CalEvent.teamNames | escape | replace('\\n', '<br>') | safe }}</p>
<div class="Clear"></div>
{% if CalEvent.resourceNames %}
<label>{{ 'Agent' | Translate }}:</label>
<p class="Value">{{ CalEvent.resourceNames | replace('\\n', '<br>') | safe }}</p>
<p class="Value">{{ CalEvent.resourceNames | escape | replace('\\n', '<br>') | safe }}</p>
<div class="Clear"></div>
{% endif %}
</fieldset>
{% endif %}
<fieldset>
<legend><span>{{ 'Date/Time' | Translate}}</span></legend>
<legend><span>{{ 'Date/Time' | Translate }}</span></legend>
<label>{{ 'Start date' | Translate }}:</label>
<p class="Value">{{ CalEvent.startDate }}</p>
<div class="Clear"></div>
Expand All @@ -85,7 +85,7 @@
<legend><span>{{ 'Link' | Translate }}</span></legend>
{% for PluginKey, PluginValue in PluginList %}
<label>{{ PluginValue.PluginName }}:</label>
<p class="Value">{{ CalEvent.pluginData[PluginKey] | safe }}</p>
<p class="Value">{{ CalEvent.pluginData[PluginKey] | escape | replace('\\n', '<br>') | safe }}</p>
<div class="Clear"></div>
{% endfor %}
</fieldset>
Expand Down
Expand Up @@ -7,10 +7,10 @@
# --

<tr style="display: none;">
<td class="Filename">{{ Filename | safe }}</td>
<td class="Filetype">{{ Filetype | safe }}</td>
<td class="Filesize">{{ Filesize | safe }}</td>
<td class="Filename">{{ Filename }}</td>
<td class="Filetype">{{ Filetype }}</td>
<td class="Filesize">{{ Filesize }}</td>
<td class="Center">
<a href="#" data-file-id="{{ FileID | safe }}" class="AttachmentDelete"><i class="fa fa-trash"></i></a>
<a href="#" data-file-id="{{ FileID }}" class="AttachmentDelete"><i class="fa fa-trash"></i></a>
</td>
</tr>
Expand Up @@ -7,8 +7,8 @@
# --

<tr class="Hidden Uploading">
<td class="Filename">{{ Filename | safe }}</td>
<td class="Filetype">{{ Filetype | safe }}</td>
<td class="Filename">{{ Filename }}</td>
<td class="Filetype">{{ Filetype }}</td>
<td class="Filesize">
<span class="Progress"></span>
</td>
Expand Down
Expand Up @@ -7,5 +7,5 @@
# --

<li>
<a title="{{ Title }}" href="{{ URL | safe}}">{{ Title }}</a>
<a title="{{ Title }}" href="{{ URL }}">{{ Title }}</a>
</li>
2 changes: 1 addition & 1 deletion var/httpd/htdocs/js/Core.Agent.AppointmentCalendar.js
Expand Up @@ -1376,7 +1376,7 @@ Core.Agent.AppointmentCalendar = (function (TargetNS) {

// Overwrite option text, because of wrong html quoting of text content.
// (This is needed for IE.)
NewOption.innerHTML = Value;
NewOption.innerHTML = Core.App.EscapeHTML(Value);

// Restore selection
if (SelectedID && SelectedID.indexOf(Index) > -1) {
Expand Down

0 comments on commit b99cad2

Please sign in to comment.