From cdaef76fafbe837a7f2b9949e7303c3b87a2612d Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 27 Jun 2019 09:20:11 +0200 Subject: [PATCH] vendor: Update Parsedown to version 1.7.3 refs #3785 --- library/vendor/Parsedown/Parsedown.php | 18 ++++++++++++++++-- library/vendor/Parsedown/SOURCE | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/library/vendor/Parsedown/Parsedown.php b/library/vendor/Parsedown/Parsedown.php index 87d612ab8..a34b44f0f 100644 --- a/library/vendor/Parsedown/Parsedown.php +++ b/library/vendor/Parsedown/Parsedown.php @@ -17,7 +17,7 @@ class Parsedown { # ~ - const version = '1.7.1'; + const version = '1.7.3'; # ~ @@ -429,7 +429,21 @@ class Parsedown if (isset($matches[1])) { - $class = 'language-'.$matches[1]; + /** + * https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes + * Every HTML element may have a class attribute specified. + * The attribute, if specified, must have a value that is a set + * of space-separated tokens representing the various classes + * that the element belongs to. + * [...] + * The space characters, for the purposes of this specification, + * are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), + * U+000A LINE FEED (LF), U+000C FORM FEED (FF), and + * U+000D CARRIAGE RETURN (CR). + */ + $language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r")); + + $class = 'language-'.$language; $Element['attributes'] = array( 'class' => $class, diff --git a/library/vendor/Parsedown/SOURCE b/library/vendor/Parsedown/SOURCE index ead5e4ec4..4570e917c 100644 --- a/library/vendor/Parsedown/SOURCE +++ b/library/vendor/Parsedown/SOURCE @@ -1,4 +1,4 @@ -RELEASE=1.7.1 +RELEASE=1.7.3 PARSEDOWN=parsedown-$RELEASE curl https://codeload.github.com/erusev/parsedown/tar.gz/${RELEASE} -o ${PARSEDOWN}.tar.gz tar xfz ${PARSEDOWN}.tar.gz --strip-components 1 ${PARSEDOWN}/Parsedown.php ${PARSEDOWN}/LICENSE.txt