1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

Merge pull request #761 from vichan-devel/parsedown

Parsedown
This commit is contained in:
Lorenzo Yario 2024-06-05 18:49:27 -07:00 committed by GitHub
commit 2d6b599b26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,8 @@
"gettext/gettext": "^5.5", "gettext/gettext": "^5.5",
"mrclay/minify": "^2.1.6", "mrclay/minify": "^2.1.6",
"geoip/geoip": "^1.17", "geoip/geoip": "^1.17",
"dapphp/securimage": "^4.0" "dapphp/securimage": "^4.0",
"erusev/parsedown": "^1.7.4"
}, },
"autoload": { "autoload": {
"classmap": ["inc/"], "classmap": ["inc/"],

View File

@ -2820,7 +2820,6 @@ function purify_html($s) {
function markdown($s) { function markdown($s) {
$pd = new Parsedown(); $pd = new Parsedown();
$pd->setMarkupEscaped(true); $pd->setMarkupEscaped(true);
$pd->setimagesEnabled(false);
return $pd->text($s); return $pd->text($s);
} }

View File

@ -166,7 +166,7 @@
<li> <li>
A newer version of vichan A newer version of vichan
(<strong>v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}</strong>) is available! (<strong>v{{ newer_release.massive }}.{{ newer_release.major }}.{{ newer_release.minor }}</strong>) is available!
See <a href="https://engine.vichan.net">https://engine.vichan.net/</a> for upgrade instructions. See <a href="https://vichan.info">https://vichan.info/</a> for upgrade instructions.
</li> </li>
</ul> </ul>
</fieldset> </fieldset>

View File

@ -5,7 +5,7 @@
<tr> <tr>
<th>{% trans %}Markup method{% endtrans %} <th>{% trans %}Markup method{% endtrans %}
{% set allowed_html = config.allowed_html %} {% set allowed_html = config.allowed_html %}
{% trans %}<p class="unimportant">"markdown" is provided by <a href="http://parsedown.org/">parsedown</a>. Note: images disabled.</p> {% trans %}<p class="unimportant">"markdown" is provided by <a href="http://parsedown.org/">parsedown</a></p>
<p class="unimportant">"html" allows the following tags:<br/>{{ allowed_html }}</p> <p class="unimportant">"html" allows the following tags:<br/>{{ allowed_html }}</p>
<p class="unimportant">"infinity" is the same as what is used in posts.</p> <p class="unimportant">"infinity" is the same as what is used in posts.</p>
<p class="unimportant">This page will not convert between formats,<br/>choose it once or do the conversion yourself!</p>{% endtrans %} <p class="unimportant">This page will not convert between formats,<br/>choose it once or do the conversion yourself!</p>{% endtrans %}