Fix rules page formatting (#177)

The rules page uses a textarea to show lines break.
This commit replaces the textarea and uses the Twig
nl2br function to format the text for web browsers.

Fixes #176
This commit is contained in:
Silic0n Alph4 2021-10-30 18:29:36 +01:00 committed by GitHub
parent 50270f6d6f
commit 28dd1969b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,2 @@
{% if constant('PAGE') == 'rules' %}
<b>{{ config.lua.serverName }} Rules</b><br/>
<textarea rows="25" wrap="physical" cols="70" readonly="true">
{% endif %}
{{ getCustomPage('rules_on_the_page') }}
{% if constant('PAGE') == 'rules' %}
</textarea>
{% endif %}
{{ getCustomPage('rules_on_the_page') | nl2br }}