fixed xss in timesheet description (#962)
This commit is contained in:
@@ -77,6 +77,6 @@ class MarkdownExtension extends AbstractExtension
|
|||||||
*/
|
*/
|
||||||
public function markdownToHtml(string $content): string
|
public function markdownToHtml(string $content): string
|
||||||
{
|
{
|
||||||
return $this->markdown->toHtml($content, true);
|
return $this->markdown->toHtml($content, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,7 +276,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="column-description" {% if not columns.description %}style="display: none"{% endif %}>
|
<td class="column-description" {% if not columns.description %}style="display: none"{% endif %}>
|
||||||
{% if entry.description is not empty %}
|
{% if entry.description is not empty %}
|
||||||
{{ entry.description|desc2html }}
|
{{ entry.description|escape|desc2html }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="column-exported" {% if not columns.exported %}style="display: none"{% endif %}>
|
<td class="column-exported" {% if not columns.exported %}style="display: none"{% endif %}>
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ mpdf-->
|
|||||||
{{ entry.project.customer.name }} - {{ entry.project.name }} - {{ entry.activity.name }}
|
{{ entry.project.customer.name }} - {{ entry.project.name }} - {{ entry.activity.name }}
|
||||||
{% if entry.description is not empty %}
|
{% if entry.description is not empty %}
|
||||||
<br>
|
<br>
|
||||||
<i>{{ entry.description|desc2html }}</i>
|
<i>{{ entry.description|escape|desc2html }}</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td class="duration">{{ entry.duration|duration }}</td>
|
<td class="duration">{{ entry.duration|duration }}</td>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'user') }}">{{ widgets.label_user(entry.user) }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'user') }}">{{ widgets.label_user(entry.user) }}</td>
|
||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }} timesheet-description">
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }} timesheet-description">
|
||||||
{% if entry.description is not empty %}
|
{% if entry.description is not empty %}
|
||||||
{{ entry.description|desc2html }}
|
{{ entry.description|escape|desc2html }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ entry.activity.name }} / {{ entry.project.name }}
|
{{ entry.activity.name }} / {{ entry.project.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if entry.description is not empty %}
|
{% if entry.description is not empty %}
|
||||||
<div>
|
<div>
|
||||||
{{ entry.description|desc2html }}
|
{{ entry.description|escape|desc2html }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="small">
|
<span class="small">
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
<td>
|
<td>
|
||||||
{% if entry.description is not empty %}
|
{% if entry.description is not empty %}
|
||||||
<div>
|
<div>
|
||||||
{{ entry.description|desc2html }}
|
{{ entry.description|escape|desc2html }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="small">
|
<span class="small">
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'customer') }}">{{ widgets.label_customer(entry.project.customer) }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'customer') }}">{{ widgets.label_customer(entry.project.customer) }}</td>
|
||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'project') }}">{{ widgets.label_project(entry.project) }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'project') }}">{{ widgets.label_project(entry.project) }}</td>
|
||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'activity') }}">{{ widgets.label_activity(entry.activity) }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'activity') }}">{{ widgets.label_activity(entry.activity) }}</td>
|
||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }} timesheet-description">{{ entry.description|desc2html }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }} timesheet-description">{{ entry.description|escape|desc2html }}</td>
|
||||||
<td class="{{ tables.data_table_column_class(tableName, columns, 'tags') }}">{{ widgets.tag_list(entry.tags) }}</td>
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'tags') }}">{{ widgets.tag_list(entry.tags) }}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{- actions.timesheet(entry, 'index') -}}
|
{{- actions.timesheet(entry, 'index') -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user