From 3677e090c4ae674b0762172521f99f3b0ed8c503 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 16 Apr 2024 20:15:00 +0300 Subject: [PATCH] append title attribute on address does not match alt value --- src/Pango.php | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/Pango.php b/src/Pango.php index 310ae66..de46f7f 100644 --- a/src/Pango.php +++ b/src/Pango.php @@ -160,18 +160,32 @@ class Pango } } - $lines[$index] = sprintf( - '%s', - $address, - self::escape( - urldecode( - $address + if ($alt == $address) + { + $lines[$index] = sprintf( + '%s', + $address, + self::escape( + $alt ) - ), - self::escape( - $alt - ) - ); + ); + } + + else + { + $lines[$index] = sprintf( + '%s', + $address, + self::escape( + urldecode( + $address + ) + ), + self::escape( + $alt + ) + ); + } $escaped[] = $index; }