From 5c99c8395eece3b4147a87ae764b4fa7648744a3 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 5 Jun 2024 18:00:24 -0700 Subject: [PATCH 1/4] add parsedown --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4bf9bcc2..80eaf918 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ "gettext/gettext": "^5.5", "mrclay/minify": "^2.1.6", "geoip/geoip": "^1.17", - "dapphp/securimage": "^4.0" + "dapphp/securimage": "^4.0", + "erusev/parsedown": "^1.7.4" }, "autoload": { "classmap": ["inc/"], From 809ab99c9bf00fa8cba2ba117fd318847ec5471b Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 5 Jun 2024 18:02:08 -0700 Subject: [PATCH 2/4] allow images for markdown --- inc/functions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/functions.php b/inc/functions.php index be1eb73c..c5b256ec 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2820,7 +2820,6 @@ function purify_html($s) { function markdown($s) { $pd = new Parsedown(); $pd->setMarkupEscaped(true); - $pd->setimagesEnabled(false); return $pd->text($s); } From f852172e9b2ca258740d7a053e8db5bbf645827b Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 5 Jun 2024 18:05:43 -0700 Subject: [PATCH 3/4] no they're not --- templates/mod/edit_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mod/edit_page.html b/templates/mod/edit_page.html index 3d132767..48b0dedf 100644 --- a/templates/mod/edit_page.html +++ b/templates/mod/edit_page.html @@ -5,7 +5,7 @@ {% trans %}Markup method{% endtrans %} {% set allowed_html = config.allowed_html %} - {% trans %}

"markdown" is provided by parsedown. Note: images disabled.

+ {% trans %}

"markdown" is provided by parsedown

"html" allows the following tags:
{{ allowed_html }}

"infinity" is the same as what is used in posts.

This page will not convert between formats,
choose it once or do the conversion yourself!

{% endtrans %} From bd7eb130ea4714624f3df5f340a1ed4b1c0b1335 Mon Sep 17 00:00:00 2001 From: Lorenzo Yario Date: Wed, 5 Jun 2024 18:08:23 -0700 Subject: [PATCH 4/4] use current website --- templates/mod/dashboard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html index 945b19fe..a5e11f82 100644 --- a/templates/mod/dashboard.html +++ b/templates/mod/dashboard.html @@ -166,7 +166,7 @@
  • A newer version of vichan (v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}) is available! - See https://engine.vichan.net/ for upgrade instructions. + See https://vichan.info/ for upgrade instructions.