From ff2df04a589fa3d00ea728762c3e1ad0fa6cb38b Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 2 Apr 2018 18:04:40 -0600 Subject: [PATCH] Temporarily using parsedown `dev-master` to address HTML encoding issues #1921 --- CHANGELOG.md | 2 +- composer.json | 7 +- composer.lock | 128 +++++++++--------- .../Grav/Common/Markdown/ParsedownTest.php | 4 +- 4 files changed, 75 insertions(+), 66 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d775b7a5..677d25ce6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## mm/dd/2018 1. [](#bugfix) - * ix for bad reference to `ZipArchive` in `GPM::Installer` + * Fix for bad reference to `ZipArchive` in `GPM::Installer` # v1.4.2 ## 03/21/2018 diff --git a/composer.json b/composer.json index 995bd0a85..062cd2e7c 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "roave/security-advisories": "dev-master", "php": ">=5.5.9", "twig/twig": "~1.24", - "erusev/parsedown": "~1.6", + "erusev/parsedown": "dev-master as 1.7.1", "erusev/parsedown-extra": "~0.7", "symfony/yaml": "~2.8", "symfony/console": "~2.8", @@ -53,7 +53,12 @@ { "type": "vcs", "url": "https://github.com/trilbymedia/PHP-Markdown-Documentation-Generator" + }, + { + "type": "vcs", + "url": "https://github.com/getgrav/parsedown" } + ], "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 38e461d4c..7d23b8677 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "fd0eed10f16784270a72286db775c95a", + "content-hash": "94f184cc9e11a8a51ec966229f511626", "packages": [ { "name": "antoligy/dom-string-iterators", @@ -52,16 +52,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.1.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288" + "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/943b2c4fcad1ef178d16a713c2468bf7e579c288", - "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169", + "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169", "shasum": "" }, "require": { @@ -70,7 +70,7 @@ "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", "psr/log": "^1.0", "symfony/process": "^2.5 || ^3.0 || ^4.0" }, @@ -104,7 +104,7 @@ "ssl", "tls" ], - "time": "2017-11-29T09:37:33+00:00" + "time": "2018-03-29T19:57:20+00:00" }, { "name": "doctrine/cache", @@ -295,32 +295,24 @@ }, { "name": "erusev/parsedown", - "version": "1.7.1", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + "url": "https://github.com/getgrav/parsedown.git", + "reference": "e7443a2bd868e78946ae6a01a1b07d477ce6f4cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", - "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "url": "https://api.github.com/repos/getgrav/parsedown/zipball/e7443a2bd868e78946ae6a01a1b07d477ce6f4cc", + "reference": "e7443a2bd868e78946ae6a01a1b07d477ce6f4cc", "shasum": "" }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, "type": "library", "autoload": { "psr-0": { "Parsedown": "" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -337,7 +329,10 @@ "markdown", "parser" ], - "time": "2018-03-08T01:11:30+00:00" + "support": { + "source": "https://github.com/getgrav/parsedown/tree/master" + }, + "time": "2015-12-19T03:45:14+00:00" }, { "name": "erusev/parsedown-extra", @@ -827,16 +822,16 @@ }, { "name": "miljar/php-exif", - "version": "v0.6.3", + "version": "v0.6.4", "source": { "type": "git", "url": "https://github.com/PHPExif/php-exif.git", - "reference": "e43cc30608824d7f3466653b52bbbb71874b5b02" + "reference": "361c15b8bc7d5ef26a9492fe537f09c920fe6511" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPExif/php-exif/zipball/e43cc30608824d7f3466653b52bbbb71874b5b02", - "reference": "e43cc30608824d7f3466653b52bbbb71874b5b02", + "url": "https://api.github.com/repos/PHPExif/php-exif/zipball/361c15b8bc7d5ef26a9492fe537f09c920fe6511", + "reference": "361c15b8bc7d5ef26a9492fe537f09c920fe6511", "shasum": "" }, "require": { @@ -878,7 +873,7 @@ "jpeg", "tiff" ], - "time": "2017-02-06T14:40:26+00:00" + "time": "2018-03-27T10:41:55+00:00" }, { "name": "monolog/monolog", @@ -1208,12 +1203,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "6da6150c9fb568739c8508a9859e9d5d7a5e99e9" + "reference": "c83f6aa0ed08f680c012656d411d1b7c94003012" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6da6150c9fb568739c8508a9859e9d5d7a5e99e9", - "reference": "6da6150c9fb568739c8508a9859e9d5d7a5e99e9", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/c83f6aa0ed08f680c012656d411d1b7c94003012", + "reference": "c83f6aa0ed08f680c012656d411d1b7c94003012", "shasum": "" }, "conflict": { @@ -1244,8 +1239,8 @@ "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", "dompdf/dompdf": ">=0.6,<0.6.2", - "drupal/core": ">=8,<8.4.5", - "drupal/drupal": ">=8,<8.4.5", + "drupal/core": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", + "drupal/drupal": ">=7,<7.58|>=8,<8.4.6|>=8.5,<8.5.1", "erusev/parsedown": "<1.7", "ezsystems/ezpublish-legacy": ">=5.3,<5.3.12.3|>=5.4,<5.4.11.3|>=2017.8,<2017.8.1.1|>=2017.12,<2017.12.2.1", "firebase/php-jwt": "<2", @@ -1254,10 +1249,11 @@ "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", - "illuminate/auth": ">=4,<4.0.99|>=4.1,<4.1.26", + "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10", "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", + "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "joomla/session": "<1.3.1", - "laravel/framework": ">=4,<4.0.99|>=4.1,<4.1.29", + "laravel/framework": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", "magento/magento1ee": ">=1.9,<1.14.3.2", @@ -1307,7 +1303,7 @@ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", + "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", "titon/framework": ">=0,<9.9.99", "twig/twig": "<1.20", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", @@ -1359,7 +1355,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-03-20T15:54:02+00:00" + "time": "2018-04-02T06:47:13+00:00" }, { "name": "rockettheme/toolbox", @@ -1459,16 +1455,16 @@ }, { "name": "symfony/console", - "version": "v2.8.36", + "version": "v2.8.37", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a6ff8b2ffa4eb43046828b303af2e3fedadacc27" + "reference": "390fa4899dbcc47bd41935d87c4572ea4305d3ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a6ff8b2ffa4eb43046828b303af2e3fedadacc27", - "reference": "a6ff8b2ffa4eb43046828b303af2e3fedadacc27", + "url": "https://api.github.com/repos/symfony/console/zipball/390fa4899dbcc47bd41935d87c4572ea4305d3ce", + "reference": "390fa4899dbcc47bd41935d87c4572ea4305d3ce", "shasum": "" }, "require": { @@ -1516,7 +1512,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-02-26T15:33:21+00:00" + "time": "2018-03-19T21:13:58+00:00" }, { "name": "symfony/debug", @@ -1577,7 +1573,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.36", + "version": "v2.8.37", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1755,7 +1751,7 @@ }, { "name": "symfony/var-dumper", - "version": "v2.8.36", + "version": "v2.8.37", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -1823,7 +1819,7 @@ }, { "name": "symfony/yaml", - "version": "v2.8.36", + "version": "v2.8.37", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -1998,21 +1994,21 @@ }, { "name": "codeception/codeception", - "version": "2.4.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/Codeception/Codeception.git", - "reference": "c50789a9a62cc0eefc0252e88a5f04f8c47b55f4" + "reference": "bca3547632556875f1cdd567d6057cc14fe472b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/Codeception/zipball/c50789a9a62cc0eefc0252e88a5f04f8c47b55f4", - "reference": "c50789a9a62cc0eefc0252e88a5f04f8c47b55f4", + "url": "https://api.github.com/repos/Codeception/Codeception/zipball/bca3547632556875f1cdd567d6057cc14fe472b8", + "reference": "bca3547632556875f1cdd567d6057cc14fe472b8", "shasum": "" }, "require": { "behat/gherkin": "^4.4.0", - "codeception/phpunit-wrapper": "^6.0|^7.0", + "codeception/phpunit-wrapper": "^6.0.9|^7.0.6", "codeception/stub": "^1.0", "ext-json": "*", "ext-mbstring": "*", @@ -2085,20 +2081,20 @@ "functional testing", "unit testing" ], - "time": "2018-02-27T00:09:12+00:00" + "time": "2018-03-31T22:30:43+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "6.0.8", + "version": "6.0.9", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "e18f3ea1f841bfd2cecaf6e183e584127b9d467b" + "reference": "450f1cfc5f49539c421061e64338f5edb8baad6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/e18f3ea1f841bfd2cecaf6e183e584127b9d467b", - "reference": "e18f3ea1f841bfd2cecaf6e183e584127b9d467b", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/450f1cfc5f49539c421061e64338f5edb8baad6a", + "reference": "450f1cfc5f49539c421061e64338f5edb8baad6a", "shasum": "" }, "require": { @@ -2131,7 +2127,7 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2018-03-16T10:17:47+00:00" + "time": "2018-03-31T18:50:01+00:00" }, { "name": "codeception/stub", @@ -2324,16 +2320,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.3.0", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", - "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90", + "reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90", "shasum": "" }, "require": { @@ -2343,7 +2339,7 @@ }, "require-dev": { "ext-curl": "*", - "phpunit/phpunit": "^4.0 || ^5.0", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4", "psr/log": "^1.0" }, "suggest": { @@ -2352,7 +2348,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.2-dev" + "dev-master": "6.3-dev" } }, "autoload": { @@ -2385,7 +2381,7 @@ "rest", "web service" ], - "time": "2017-06-22T18:50:49+00:00" + "time": "2018-03-26T16:33:04+00:00" }, { "name": "guzzlehttp/promises", @@ -3756,10 +3752,18 @@ "time": "2018-01-29T19:49:41+00:00" } ], - "aliases": [], + "aliases": [ + { + "alias": "1.7.1", + "alias_normalized": "1.7.1.0", + "version": "9999999-dev", + "package": "erusev/parsedown" + } + ], "minimum-stability": "stable", "stability-flags": { "roave/security-advisories": 20, + "erusev/parsedown": 20, "victorjonsson/markdowndocs": 20 }, "prefer-stable": false, diff --git a/tests/unit/Grav/Common/Markdown/ParsedownTest.php b/tests/unit/Grav/Common/Markdown/ParsedownTest.php index 88bccabfb..e73e11f01 100644 --- a/tests/unit/Grav/Common/Markdown/ParsedownTest.php +++ b/tests/unit/Grav/Common/Markdown/ParsedownTest.php @@ -315,7 +315,7 @@ public function testExternalLinks() $this->parsedown->text('[cnn.com](http://www.cnn.com)')); $this->assertSame('

google.com

', $this->parsedown->text('[google.com](https://www.google.com)')); - $this->assertSame('

complex url

', + $this->assertSame('

complex url

', $this->parsedown->text('[complex url](https://github.com/getgrav/grav/issues/new?title=[add-resource]%20New%20Plugin/Theme&body=Hello%20**There**)')); } @@ -689,7 +689,7 @@ public function testAttributeLinks() $this->parsedown->text('[Relative Target](../item2-3?target=_blank)')); $this->assertSame('

Relative Rel

', $this->parsedown->text('[Relative Rel](../item2-3?rel=nofollow)')); - $this->assertSame('

Relative Mixed

', + $this->assertSame('

Relative Mixed

', $this->parsedown->text('[Relative Mixed](../item2-3?foo=bar&baz=qux&rel=nofollow&class=button)')); }