diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
commit | 0784cd593a39a4fc297e8a82f7e79bc8019a0868 (patch) | |
tree | 22182afb37cf460f8208fff9d276a0672add3185 /vendor/michelf/php-markdown/Michelf/MarkdownExtra.php | |
parent | 0e2e9321025f87fe9587f3d183adaea6185e4e20 (diff) | |
parent | 9c5d2ee5630dd7033904039dcd1e92db8821b644 (diff) | |
download | volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.gz volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.bz2 volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.zip |
Merge branch '7.2RC'7.2
Diffstat (limited to 'vendor/michelf/php-markdown/Michelf/MarkdownExtra.php')
-rw-r--r-- | vendor/michelf/php-markdown/Michelf/MarkdownExtra.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php index 62d25f38e..888f5f28d 100644 --- a/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php +++ b/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php @@ -4,7 +4,7 @@ * * @package php-markdown * @author Michel Fortin <michel.fortin@michelf.com> - * @copyright 2004-2019 Michel Fortin <https://michelf.com/projects/php-markdown/> + * @copyright 2004-2021 Michel Fortin <https://michelf.com/projects/php-markdown/> * @copyright (Original Markdown) 2004-2006 John Gruber <https://daringfireball.net/projects/markdown/> */ @@ -345,7 +345,7 @@ class MarkdownExtra extends \Michelf\Markdown { * Tags that are always treated as block tags * @var string */ - protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure'; + protected $block_tags_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|figure|details|summary'; /** * Tags treated as block tags only if the opening tag is alone on its line @@ -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 = "<a href=\"$url\""; - if (isset($title)) { + if (isset($title) && $title_quote) { $title = $this->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 = "<img src=\"$url\" alt=\"$alt_text\""; - if (isset($title)) { + if (isset($title) && $title_quote) { $title = $this->encodeAttribute($title); $result .= " title=\"$title\""; // $title already quoted } |