Fix document title when it's an HTML BT#15259

pull/3023/head
Julio Montoya 6 years ago
parent ae0cc64c5e
commit 4317a41fb2
  1. 5
      main/document/document.php
  2. 8
      main/inc/lib/document.lib.php

@ -1843,6 +1843,11 @@ if (!empty($documentAndFolders)) {
} else { } else {
$document_name = basename($document_data['path']); $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; $row['name'] = $document_name;
// Data for checkbox // Data for checkbox
if (($isAllowedToEdit || $groupMemberWithUploadRights) && count($documentAndFolders) > 1) { if (($isAllowedToEdit || $groupMemberWithUploadRights) && count($documentAndFolders) > 1) {

@ -5051,6 +5051,10 @@ class DocumentManager
$title = basename($document_data['path']); $title = basename($document_data['path']);
} }
if (api_get_configuration_value('save_titles_as_html')) {
$title = strip_tags($title);
}
$filetype = $document_data['filetype']; $filetype = $document_data['filetype'];
$path = $document_data['path']; $path = $document_data['path'];
$url_path = urlencode($document_data['path']); $url_path = urlencode($document_data['path']);
@ -6601,6 +6605,10 @@ class DocumentManager
$my_file_title = basename($path); $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. // Show the "image name" not the filename of the image.
if ($lp_id) { if ($lp_id) {
// LP URL // LP URL

Loading…
Cancel
Save