diff --git a/composer.json b/composer.json index a4281d5..0f49d40 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "ext-openssl": "*", "ext-gd": "*", "ext-mbstring": "*", - "scrivo/highlight.php": "v9.18.1.9", + "scrivo/highlight.php": "^9.18", "erusev/parsedown": "^1.7", "illuminate/database": "^9.4", "ext-redis": "*" diff --git a/composer.lock b/composer.lock index 0d7d67f..105d72e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bc050acf9c5c5997281c5c3a6f33c811", + "content-hash": "e4f29c3440a94cc63c1b5d37ca4f76e8", "packages": [ { "name": "brick/math", @@ -797,16 +797,16 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.9", + "version": "v9.18.1.10", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "d45585504777e6194a91dffc7270ca39833787f8" + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/d45585504777e6194a91dffc7270ca39833787f8", - "reference": "d45585504777e6194a91dffc7270ca39833787f8", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/850f4b44697a2552e892ffe71490ba2733c2fc6e", + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e", "shasum": "" }, "require": { @@ -816,8 +816,8 @@ "require-dev": { "phpunit/phpunit": "^4.8|^5.7", "sabberworm/php-css-parser": "^8.3", - "symfony/finder": "^2.8|^3.4", - "symfony/var-dumper": "^2.8|^3.4" + "symfony/finder": "^2.8|^3.4|^5.4", + "symfony/var-dumper": "^2.8|^3.4|^5.4" }, "suggest": { "ext-mbstring": "Allows highlighting code with unicode characters and supports language with unicode keywords" @@ -871,7 +871,7 @@ "type": "github" } ], - "time": "2021-12-03T06:45:28+00:00" + "time": "2022-12-17T21:53:22+00:00" }, { "name": "symfony/console", diff --git a/includes/functions.php b/includes/functions.php index 6c2d848..4856a04 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -149,6 +149,8 @@ function truncate(string $input, int $maxWords, int $maxChars) : string { } function embedView($paste_id, $p_title, $content, $title) : bool { + global $baseurl; + $stats = false; if ($content) { // Build the output @@ -200,7 +202,7 @@ function embedView($paste_id, $p_title, $content, $title) : bool { $output .= ""; $output .= $content; // Paste content $output .= ""; $output .= ""; diff --git a/public/paste.php b/public/paste.php index e7f0b78..708eacf 100644 --- a/public/paste.php +++ b/public/paste.php @@ -125,7 +125,7 @@ if (PP_MOD_REWRITE) { } /* Expiry */ -if (!empty($paste->expiry)) { +if (!empty($paste->expiry) && $paste->expiry !== 'NULL') { if ($paste->expiry === 'SELF') { $paste->delete(); flashWarning('This paste has self-destructed - if you close this window, you will no longer be able to view it!'); @@ -186,7 +186,7 @@ $p_content = rtrim($p_content); // Apply syntax highlight $p_content = htmlspecialchars_decode($p_content); -if ($paste_code === "pastedown") { +if ($paste_code === "pastedown" || $paste_code === 'pastedown_old') { $parsedown = new Parsedown(); $parsedown->setSafeMode(true); $p_content = $parsedown->text($p_content); diff --git a/theme/bulma/main.php b/theme/bulma/main.php index 7164b32..0dc9cf8 100644 --- a/theme/bulma/main.php +++ b/theme/bulma/main.php @@ -184,6 +184,7 @@
+ Type a comma to separate each tag.
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 0e17613..8275bba 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -20,7 +20,7 @@ return array( 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'PonePaste\\' => array($baseDir . '/includes'), - 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'), + 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/support'), 'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'), 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), 'Illuminate\\Container\\' => array($vendorDir . '/illuminate/container'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4b70215..53387e7 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -124,9 +124,9 @@ class ComposerStaticInit5bf95489f4eff2c10ec062bf7ba377da ), 'Illuminate\\Support\\' => array ( - 0 => __DIR__ . '/..' . '/illuminate/macroable', + 0 => __DIR__ . '/..' . '/illuminate/collections', 1 => __DIR__ . '/..' . '/illuminate/conditionable', - 2 => __DIR__ . '/..' . '/illuminate/collections', + 2 => __DIR__ . '/..' . '/illuminate/macroable', 3 => __DIR__ . '/..' . '/illuminate/support', ), 'Illuminate\\Database\\' => diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0a17f7b..a8b19f2 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -830,17 +830,17 @@ }, { "name": "scrivo/highlight.php", - "version": "v9.18.1.9", - "version_normalized": "9.18.1.9", + "version": "v9.18.1.10", + "version_normalized": "9.18.1.10", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "d45585504777e6194a91dffc7270ca39833787f8" + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/d45585504777e6194a91dffc7270ca39833787f8", - "reference": "d45585504777e6194a91dffc7270ca39833787f8", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/850f4b44697a2552e892ffe71490ba2733c2fc6e", + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e", "shasum": "" }, "require": { @@ -850,13 +850,13 @@ "require-dev": { "phpunit/phpunit": "^4.8|^5.7", "sabberworm/php-css-parser": "^8.3", - "symfony/finder": "^2.8|^3.4", - "symfony/var-dumper": "^2.8|^3.4" + "symfony/finder": "^2.8|^3.4|^5.4", + "symfony/var-dumper": "^2.8|^3.4|^5.4" }, "suggest": { "ext-mbstring": "Allows highlighting code with unicode characters and supports language with unicode keywords" }, - "time": "2021-12-03T06:45:28+00:00", + "time": "2022-12-17T21:53:22+00:00", "type": "library", "installation-source": "dist", "autoload": { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 8cdf4c8..e50ac13 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'aftercase/ponepaste', 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '8914700af7493ab2f4da22d60e13d47c410057ab', + 'reference' => '7be5984b3eea1200a34b91ba7330a415e3a61ff5', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -13,7 +13,7 @@ 'aftercase/ponepaste' => array( 'pretty_version' => 'dev-main', 'version' => 'dev-main', - 'reference' => '8914700af7493ab2f4da22d60e13d47c410057ab', + 'reference' => '7be5984b3eea1200a34b91ba7330a415e3a61ff5', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -149,9 +149,9 @@ 'dev_requirement' => false, ), 'scrivo/highlight.php' => array( - 'pretty_version' => 'v9.18.1.9', - 'version' => '9.18.1.9', - 'reference' => 'd45585504777e6194a91dffc7270ca39833787f8', + 'pretty_version' => 'v9.18.1.10', + 'version' => '9.18.1.10', + 'reference' => '850f4b44697a2552e892ffe71490ba2733c2fc6e', 'type' => 'library', 'install_path' => __DIR__ . '/../scrivo/highlight.php', 'aliases' => array(), diff --git a/vendor/scrivo/highlight.php/Highlight/RegExMatch.php b/vendor/scrivo/highlight.php/Highlight/RegExMatch.php index 2b8933d..9f06ee3 100644 --- a/vendor/scrivo/highlight.php/Highlight/RegExMatch.php +++ b/vendor/scrivo/highlight.php/Highlight/RegExMatch.php @@ -48,6 +48,12 @@ class RegExMatch implements \ArrayAccess, \Countable, \IteratorAggregate /** @var string */ public $input; + /** @var string */ + public $type; + + /** @var Mode|string */ + public $rule; + /** * @param array $results */ diff --git a/vendor/scrivo/highlight.php/Highlight/Terminators.php b/vendor/scrivo/highlight.php/Highlight/Terminators.php index bb511a2..936e66b 100644 --- a/vendor/scrivo/highlight.php/Highlight/Terminators.php +++ b/vendor/scrivo/highlight.php/Highlight/Terminators.php @@ -111,7 +111,6 @@ final class Terminators if (is_string($rule)) { $match->type = $rule; - $match->extra = array($this->mode->illegal, $this->mode->terminator_end); } else { $match->type = "begin"; $match->rule = $rule; diff --git a/vendor/scrivo/highlight.php/composer.json b/vendor/scrivo/highlight.php/composer.json index 94febd5..5e822fb 100644 --- a/vendor/scrivo/highlight.php/composer.json +++ b/vendor/scrivo/highlight.php/composer.json @@ -52,8 +52,8 @@ "require-dev": { "phpunit/phpunit": "^4.8|^5.7", "sabberworm/php-css-parser": "^8.3", - "symfony/finder": "^2.8|^3.4", - "symfony/var-dumper": "^2.8|^3.4" + "symfony/finder": "^2.8|^3.4|^5.4", + "symfony/var-dumper": "^2.8|^3.4|^5.4" }, "suggest": { "ext-mbstring": "Allows highlighting code with unicode characters and supports language with unicode keywords"