From 58b07d26c3bf0aca457b04e8262a5ee7c1e21762 Mon Sep 17 00:00:00 2001 From: Verest Date: Wed, 8 Apr 2020 20:24:25 -0700 Subject: [PATCH] fixed unintended blank title attributes --- Michelf/MarkdownExtra.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index 62d25f3..cf5b788 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -932,6 +932,7 @@ class MarkdownExtra extends \Michelf\Markdown { protected function _doAnchors_inline_callback($matches) { $link_text = $this->runSpanGamut($matches[2]); $url = $matches[3] === '' ? $matches[4] : $matches[3]; + $title_quote =& $matches[6]; $title =& $matches[7]; $attr = $this->doExtraAttributes("a", $dummy =& $matches[8]); @@ -944,7 +945,7 @@ class MarkdownExtra extends \Michelf\Markdown { $url = $this->encodeURLAttribute($url); $result = "encodeAttribute($title); $result .= " title=\"$title\""; } @@ -1056,13 +1057,14 @@ class MarkdownExtra extends \Michelf\Markdown { protected function _doImages_inline_callback($matches) { $alt_text = $matches[2]; $url = $matches[3] === '' ? $matches[4] : $matches[3]; + $title_quote =& $matches[6]; $title =& $matches[7]; $attr = $this->doExtraAttributes("img", $dummy =& $matches[8]); $alt_text = $this->encodeAttribute($alt_text); $url = $this->encodeURLAttribute($url); $result = "\"$alt_text\"";encodeAttribute($title); $result .= " title=\"$title\""; // $title already quoted }