diff --git a/app/views/docs/environment-variables.phtml b/app/views/docs/environment-variables.phtml index e655743f5..6d027bc85 100644 --- a/app/views/docs/environment-variables.phtml +++ b/app/views/docs/environment-variables.phtml @@ -1,8 +1,7 @@ getParam('variables', []); -$markdown = new \Parsedown(); -$markdown->setSafeMode(true); +$variables = $this->getParam('variables', []); +$markdown = $this->getParam('markdown', false); ?>

Appwrite environment variables allow you to edit your server setup configuration and customize it. You can easily change the environment variables by changing them when running Appwrite using Docker CLI or Docker Compose.

@@ -34,7 +33,7 @@ $markdown->setSafeMode(true);

escape($category); ?>

-

text($this->escape($description)); ?>

+

convert($this->escape($description)); ?>

@@ -58,7 +57,7 @@ $markdown->setSafeMode(true);

version >= escape($introduction); ?>

- + diff --git a/app/views/docs/models.phtml b/app/views/docs/models.phtml index d8d62105c..aed44408f 100644 --- a/app/views/docs/models.phtml +++ b/app/views/docs/models.phtml @@ -1,11 +1,9 @@ getParam('models', []); $model = $this->getParam('model', null); +$markdown = $this->getParam('markdown', false); $rules = $model['properties'] ?? []; -$markdown = new \Parsedown(); -$markdown->setSafeMode(true); - $example = function ($model, $models) use (&$example) { $output = []; @@ -126,7 +124,7 @@ $example = function ($model, $models) use (&$example) - + diff --git a/app/views/docs/sdks.phtml b/app/views/docs/sdks.phtml index 4e4a375ce..efb892180 100644 --- a/app/views/docs/sdks.phtml +++ b/app/views/docs/sdks.phtml @@ -1,8 +1,7 @@ getParam('platforms', []); -$markdown = new \Parsedown(); -$markdown->setSafeMode(true); +$markdown = $this->getParam('markdown', false); ?> @@ -23,7 +22,7 @@ $markdown->setSafeMode(true);

SDKs (beta)

-

text($platform['description']); ?>

+

convert($platform['description']); ?>

text($this->escape($description)); ?>convert($this->escape($description)); ?>
text($description); ?>convert($description); ?>
diff --git a/app/views/docs/service.phtml b/app/views/docs/service.phtml index 9b8ac8f70..d9b025427 100644 --- a/app/views/docs/service.phtml +++ b/app/views/docs/service.phtml @@ -4,6 +4,7 @@ $service = $this->getParam('service', []); $blacklist = $this->getParam('blacklist', []); $description = $this->getParam('description', ''); $spec = $this->getParam('spec', []); +$markdown = $this->getParam('markdown', false); $host = (isset($spec['host'])) ? $spec['host'] : ''; $base = (isset($spec['basePath'])) ? $spec['basePath'] : ''; $endpoint = $this->getParam('protocol', 'https') . '://' . $host . $base; @@ -32,9 +33,6 @@ $codes = [ ], ]; -$markdown = new \Parsedown(); -$markdown->setSafeMode(true); - $paramSDK = (!empty($sdk)) ? '?sdk='.$sdk : ''; ?> @@ -198,7 +196,7 @@ $paramSDK = (!empty($sdk)) ? '?sdk='.$sdk : '';
- text(file_get_contents($path)); ?> + convert(file_get_contents($path)); ?>
Edit on GitHub @@ -302,7 +300,7 @@ $paramSDK = (!empty($sdk)) ? '?sdk='.$sdk : '';
- text($description); ?> + convert($description); ?>
@@ -408,7 +406,7 @@ $paramSDK = (!empty($sdk)) ? '?sdk='.$sdk : '';
- + diff --git a/composer.json b/composer.json index 371a90b90..79447b774 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,6 @@ "ext-imagick": "*", "ext-mbstring": "*", "ext-json": "*", - "erusev/parsedown": "1.7.4", "utopia-php/framework": "0.*.*" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 9c76a9193..4195c6fa2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,78 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "797e15c4976326fb5a468c0ba8b8f945", + "content-hash": "eff5a93c1452ba34949d89f46deaecb2", "packages": [ - { - "name": "erusev/parsedown", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "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" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "support": { - "issues": "https://github.com/erusev/parsedown/issues", - "source": "https://github.com/erusev/parsedown/tree/1.7.x" - }, - "time": "2019-12-30T22:54:17+00:00" - }, { "name": "utopia-php/framework", - "version": "0.19.21", + "version": "0.23.2", "source": { "type": "git", "url": "https://github.com/utopia-php/framework.git", - "reference": "3b7bd8e4acf84fd7d560ced8e0142221d302575d" + "reference": "847cfd48fa93f25797dea0be5692f5c3735c9b2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/framework/zipball/3b7bd8e4acf84fd7d560ced8e0142221d302575d", - "reference": "3b7bd8e4acf84fd7d560ced8e0142221d302575d", + "url": "https://api.github.com/repos/utopia-php/framework/zipball/847cfd48fa93f25797dea0be5692f5c3735c9b2f", + "reference": "847cfd48fa93f25797dea0be5692f5c3735c9b2f", "shasum": "" }, "require": { "php": ">=8.0.0" }, "require-dev": { - "phpunit/phpunit": "^9.5.10", - "vimeo/psalm": "4.13.1" + "phpunit/phpunit": "^9.5.25", + "vimeo/psalm": "^4.27.0" }, "type": "library", "autoload": { @@ -87,12 +37,6 @@ "license": [ "MIT" ], - "authors": [ - { - "name": "Eldad Fux", - "email": "eldad@appwrite.io" - } - ], "description": "A simple, light and advanced PHP framework", "keywords": [ "framework", @@ -101,9 +45,9 @@ ], "support": { "issues": "https://github.com/utopia-php/framework/issues", - "source": "https://github.com/utopia-php/framework/tree/0.19.21" + "source": "https://github.com/utopia-php/framework/tree/0.23.2" }, - "time": "2022-05-12T18:42:28+00:00" + "time": "2022-10-25T15:05:52+00:00" } ], "packages-dev": [ @@ -113,12 +57,12 @@ "source": { "type": "git", "url": "https://github.com/amphp/amp.git", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + "reference": "c5ea79065f98f93f7b16a4d5a504fe5d69451447" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", - "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "url": "https://api.github.com/repos/amphp/amp/zipball/c5ea79065f98f93f7b16a4d5a504fe5d69451447", + "reference": "c5ea79065f98f93f7b16a4d5a504fe5d69451447", "shasum": "" }, "require": { @@ -187,7 +131,7 @@ "support": { "irc": "irc://irc.freenode.org/amphp", "issues": "https://github.com/amphp/amp/issues", - "source": "https://github.com/amphp/amp/tree/v2.6.2" + "source": "https://github.com/amphp/amp/tree/master" }, "funding": [ { @@ -195,7 +139,7 @@ "type": "github" } ], - "time": "2022-02-20T17:52:18+00:00" + "time": "2022-08-21T11:55:21+00:00" }, { "name": "amphp/byte-stream", @@ -691,12 +635,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "2d589921f23d869846a52c541247e0bafca61ab3" + "reference": "2f1fd784fe5560675722a1e5cbbcece5f43bf3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2d589921f23d869846a52c541247e0bafca61ab3", - "reference": "2d589921f23d869846a52c541247e0bafca61ab3", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/2f1fd784fe5560675722a1e5cbbcece5f43bf3a0", + "reference": "2f1fd784fe5560675722a1e5cbbcece5f43bf3a0", "shasum": "" }, "require": { @@ -739,7 +683,7 @@ "issues": "https://github.com/nikic/PHP-Parser/issues", "source": "https://github.com/nikic/PHP-Parser/tree/4.x" }, - "time": "2022-06-04T10:44:36+00:00" + "time": "2022-09-10T20:41:13+00:00" }, { "name": "openlss/lib-array2xml", @@ -853,12 +797,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "9455bde915e322a823d464a2c41e5c0de03512a6" + "reference": "203354b3c050367925c10e016b4e2e04755705ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/9455bde915e322a823d464a2c41e5c0de03512a6", - "reference": "9455bde915e322a823d464a2c41e5c0de03512a6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/203354b3c050367925c10e016b4e2e04755705ce", + "reference": "203354b3c050367925c10e016b4e2e04755705ce", "shasum": "" }, "require": { @@ -870,7 +814,12 @@ }, "require-dev": { "mockery/mockery": "~1.3.5", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.26" }, "default-branch": true, "type": "library", @@ -903,7 +852,7 @@ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2022-04-02T20:16:01+00:00" + "time": "2022-08-27T10:55:55+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -911,21 +860,26 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { "ext-tokenizer": "*", - "psalm/phar": "^4.8" + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "default-branch": true, "type": "library", @@ -952,9 +906,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "psr/container", @@ -962,12 +916,12 @@ "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "reference": "90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/php-fig/container/zipball/90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5", + "reference": "90db7b9ac2a2c5b849fcb69dde58f3ae182c68f5", "shasum": "" }, "require": { @@ -1006,9 +960,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "source": "https://github.com/php-fig/container/tree/master" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2022-07-19T17:36:59+00:00" }, { "name": "psr/log", @@ -1132,12 +1086,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "09a5561288c73b1ac9aaa00d64ebe6a6782a6a3b" + "reference": "ae0727b4b524bebd61096c967d130bd12d6c0f22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/09a5561288c73b1ac9aaa00d64ebe6a6782a6a3b", - "reference": "09a5561288c73b1ac9aaa00d64ebe6a6782a6a3b", + "url": "https://api.github.com/repos/symfony/console/zipball/ae0727b4b524bebd61096c967d130bd12d6c0f22", + "reference": "ae0727b4b524bebd61096c967d130bd12d6c0f22", "shasum": "" }, "require": { @@ -1223,7 +1177,7 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2022-10-18T13:11:10+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1797,12 +1751,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "8336f2b06febd99d6309550ccdf4ca4cd054e73a" + "reference": "cb82f217a2029131afbcbd220c511d0d77ebed19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/8336f2b06febd99d6309550ccdf4ca4cd054e73a", - "reference": "8336f2b06febd99d6309550ccdf4ca4cd054e73a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/cb82f217a2029131afbcbd220c511d0d77ebed19", + "reference": "cb82f217a2029131afbcbd220c511d0d77ebed19", "shasum": "" }, "require": { @@ -1875,7 +1829,7 @@ "type": "tidelift" } ], - "time": "2022-05-20T13:56:22+00:00" + "time": "2022-05-30T19:19:18+00:00" }, { "name": "symfony/string", @@ -1883,12 +1837,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "9c4a9a2eacc3edb31ec95c4fb6b189d28406537e" + "reference": "5d8211c95d9a0d913a0ccb02e932c8268ae9d3d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/9c4a9a2eacc3edb31ec95c4fb6b189d28406537e", - "reference": "9c4a9a2eacc3edb31ec95c4fb6b189d28406537e", + "url": "https://api.github.com/repos/symfony/string/zipball/5d8211c95d9a0d913a0ccb02e932c8268ae9d3d3", + "reference": "5d8211c95d9a0d913a0ccb02e932c8268ae9d3d3", "shasum": "" }, "require": { @@ -1904,6 +1858,7 @@ "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, @@ -1960,7 +1915,7 @@ "type": "tidelift" } ], - "time": "2022-06-26T16:35:21+00:00" + "time": "2022-10-17T20:01:40+00:00" }, { "name": "vimeo/psalm",
escape($type); ?>text($description); ?>convert($description); ?>