[PR #2457] [CLOSED] Patch for Email Headers aren't truncated #2562

Closed
opened 2026-02-27 12:11:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/modoboa/modoboa/pull/2457
Author: @mohamed-ghayyad
Created: 2/8/2022
Status: Closed

Base: masterHead: master


📝 Commits (2)

📄 Description

Description of the issue

see https://github.com/modoboa/modoboa-webmail/issues/230

Patch:

Replace
{% if hdr.safe %}{{ hdr.value|safe }}{% else %}{{ hdr.value }}{% endif %}
With
{% if hdr.safe %}
{% if hdr.value|length > 100 %}
{{ hdr.value|safe|truncatechars_html:100 }}
{% else %}
{{ hdr.value|safe }}
{% endif %}
{% elif hdr.value|length > 100 %}
{{ hdr.value|truncatechars_html:100}}
{% else %}
{{ hdr.value}}
{% endif %}


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/modoboa/modoboa/pull/2457 **Author:** [@mohamed-ghayyad](https://github.com/mohamed-ghayyad) **Created:** 2/8/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`97d7589`](https://github.com/modoboa/modoboa/commit/97d75891d6eac9ca9362d181058129afc5f249d1) Patch for imap4-utf-7 on Debian 11 and Python 3.9 #227 - [`62ef794`](https://github.com/modoboa/modoboa/commit/62ef79484ce5ce47aaa3dd05ac8e4de05f3b66bf) Merge branch 'master' of https://github.com/mohamed-ghayyad/modoboa ### 📄 Description Description of the issue see https://github.com/modoboa/modoboa-webmail/issues/230 Patch: Replace `{% if hdr.safe %}{{ hdr.value|safe }}{% else %}{{ hdr.value }}{% endif %}` With ` {% if hdr.safe %}` ` {% if hdr.value|length > 100 %}` ` {{ hdr.value|safe|truncatechars_html:100 }}` ` {% else %}` ` {{ hdr.value|safe }}` ` {% endif %}` ` {% elif hdr.value|length > 100 %}` ` {{ hdr.value|truncatechars_html:100}}` ` {% else %}` ` {{ hdr.value}}` ` {% endif %}` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 12:11:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#2562
No description provided.