diff --git a/main/document/document.php b/main/document/document.php index 7af6218931..ecec0d082d 100755 --- a/main/document/document.php +++ b/main/document/document.php @@ -1843,6 +1843,11 @@ if (!empty($documentAndFolders)) { } else { $document_name = basename($document_data['path']); } + + if (api_get_configuration_value('save_titles_as_html')) { + $document_name = strip_tags($document_name); + } + $row['name'] = $document_name; // Data for checkbox if (($isAllowedToEdit || $groupMemberWithUploadRights) && count($documentAndFolders) > 1) { diff --git a/main/inc/lib/document.lib.php b/main/inc/lib/document.lib.php index 5cc68a948b..d9bf01fde5 100644 --- a/main/inc/lib/document.lib.php +++ b/main/inc/lib/document.lib.php @@ -5051,6 +5051,10 @@ class DocumentManager $title = basename($document_data['path']); } + if (api_get_configuration_value('save_titles_as_html')) { + $title = strip_tags($title); + } + $filetype = $document_data['filetype']; $path = $document_data['path']; $url_path = urlencode($document_data['path']); @@ -6601,6 +6605,10 @@ class DocumentManager $my_file_title = basename($path); } + if (api_get_configuration_value('save_titles_as_html')) { + $my_file_title = strip_tags($my_file_title); + } + // Show the "image name" not the filename of the image. if ($lp_id) { // LP URL