From: Michael <heluecht@pirati.ca> Date: Sat, 3 Aug 2019 11:48:47 +0000 (+0000) Subject: Respecting the "alt" description of images during import from HTML X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6e8057a1c37baaa04d7a59403fdd5da775e3cf18;p=friendica.git Respecting the "alt" description of images during import from HTML --- diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index 4be217b3e4..9f614a90c3 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -290,6 +290,7 @@ class HTML self::tagToBBCode($doc, 'a', ['href' => '/mailto:(.+)/'], '[mail=$1]', '[/mail]'); self::tagToBBCode($doc, 'a', ['href' => '/(.+)/'], '[url=$1]', '[/url]'); + self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'alt' => '/(.+)/'], '[img=$1]$2', '[/img]'); self::tagToBBCode($doc, 'img', ['src' => '/(.+)/', 'width' => '/(\d+)/', 'height' => '/(\d+)/'], '[img=$2x$3]$1', '[/img]'); self::tagToBBCode($doc, 'img', ['src' => '/(.+)/'], '[img]$1', '[/img]');