1
0

downgrade to kirby v3

This commit is contained in:
Philip Wagner
2024-09-01 10:47:15 +02:00
parent a4b2aece7b
commit af86acb7a1
1085 changed files with 54743 additions and 65042 deletions

View File

@@ -465,7 +465,7 @@ class ParsedownExtra extends Parsedown
),
);
uasort($this->DefinitionData['Footnote'], [$this,'sortFootnotes']);
uasort($this->DefinitionData['Footnote'], 'self::sortFootnotes');
foreach ($this->DefinitionData['Footnote'] as $definitionId => $DefinitionData) {
if (! isset($DefinitionData['number'])) {
@@ -570,18 +570,8 @@ class ParsedownExtra extends Parsedown
$DOMDocument = new DOMDocument();
// Migrating away from `mb_convert_encoding($elementMarkup,
//'HTML-ENTITIES', 'UTF-8');` has caused multibyte characters like
// emojis not to be converted into entities, which is needed so that
// the `DOM` extension can properly parse the markup.
// The following line works like this: It treats the input string
// as UTF-8 and converts every Unicode character with 8 or more bits
// (= character code starting at 128 or 0x80 up to the Unicode limit
// of 0x10ffff) to an entity; the third and fourth arguments for the
// map are not needed for our use case and are set to the default values
// (no offset and a full mask)
// [http://stackoverflow.com/q/11309194/200145]
$elementMarkup = mb_encode_numericentity($elementMarkup, [0x80, 0x10ffff, 0, 0xffffff], 'UTF-8');
# http://stackoverflow.com/q/11309194/200145
$elementMarkup = mb_convert_encoding($elementMarkup, 'HTML-ENTITIES', 'UTF-8');
# Ensure that saveHTML() is not remove new line characters. New lines will be split by this character.
$DOMDocument->formatOutput = true;