diff --git a/common/functions.php b/common/functions.php
index 2884dddf1..f5b4ca396 100644
--- a/common/functions.php
+++ b/common/functions.php
@@ -608,3 +608,18 @@ function utf8_trim($str)
{
return preg_replace('/^[\s\pZ\pC]+|[\s\pZ\pC]+$/u', '', $str);
}
+
+/**
+ * Check if HTML content is empty.
+ * This function checks whether any printable characters remain
+ * after removing all tags except images, videos, iframes, etc.
+ *
+ * @param string $str The input string
+ * @return bool
+ */
+function is_empty_html_content($str)
+{
+ $str = strip_tags($str, '![]()