From e8090d4149bb83289f6aa2d1d971a420ecdd706f Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 18 Apr 2024 14:20:55 +0200 Subject: [PATCH] fixes #2150 move function strip_html_in_metadata outside get_exif_data --- include/functions_metadata.inc.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php index 668ab7740..6fb3bfaa1 100644 --- a/include/functions_metadata.inc.php +++ b/include/functions_metadata.inc.php @@ -183,11 +183,6 @@ function get_exif_data($filename, $map) if (!$conf['allow_html_in_metadata']) { - function strip_html_in_metadata(&$v, $k) - { - $v = strip_tags($v); - } - foreach ($result as $key => $value) { // in case the origin of the photo is unsecure (user upload), we remove @@ -206,6 +201,10 @@ function get_exif_data($filename, $map) return $result; } +function strip_html_in_metadata(&$v, $k) +{ + $v = strip_tags($v); +} /** * Converts EXIF GPS format to a float value.