diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php
index c450af66ad5..f7284439041 100644
--- a/apps/files_versions/templates/history.php
+++ b/apps/files_versions/templates/history.php
@@ -5,29 +5,29 @@
if( isset( $_['message'] ) ) {
- if( isset($_['path'] ) ) echo('File: '.$_['path'] ).'
';
- echo(''.$_['message'] ).'
';
+ if( isset($_['path'] ) ) print_unescaped('File: '.OC_Util::sanitizeHTML($_['path'])).'
';
+ print_unescaped(''.OC_Util::sanitizeHTML($_['message']) ).'
';
}else{
if( isset( $_['outcome_stat'] ) ) {
- echo( '
'.$l->t('Revert a file to a previous version by clicking on its revert button').'
'.OC_Util::sanitizeHTML($l->t('Revert a file to a previous version by clicking on its revert button')).'