Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-ALT-DESC parameter is not cleared for tasks when description is changed #2239

Closed
Gorendal opened this issue Mar 19, 2023 · 0 comments · Fixed by #2240 · May be fixed by nextcloud/server#41370
Closed

X-ALT-DESC parameter is not cleared for tasks when description is changed #2239

Gorendal opened this issue Mar 19, 2023 · 0 comments · Fixed by #2240 · May be fixed by nextcloud/server#41370
Milestone

Comments

@Gorendal
Copy link

Email-clients like MS Outlook and Em Client allow also HTML formatting in the description text of a tasks. This HTML formatted description is usually transported via the X-ALT-DESC parameter in an iCalendar element. This field seems to have become the method of choice for providing HTML formatted description data (see https://icalendar.org/the-icalendar-standard-2.html).

However: If apps like the Nextcloud Tasks App, that don't support HTML formatting in the description, change the description text, the standard procedure would be to delete the HTML formatted version and only change the plain text in the DESCRIPTION parameter of iCalendar.
This behaviour has already been implemented vor the Nextcloud Calendar App (see: nextcloud/calendar#3863 (comment), nextcloud/calendar#4744).

A similar procedure has also already been implemented for HTML formatted description data in the ALTREP parameter via fix 1916 (#1916).

Steps to reproduce

  1. Create a new Task in Em-Client Version 8.2.1721 that is connected via CalDAV to an Nextcloud instance. Add 2 lines to the description. This description is transferred via CalDAV in an iCalendar item like via these two parameters:

DESCRIPTION:Test Task Line 1\nTest Task Line 2 (both created in Em Client)
X-ALT-DESC;FMTTYPE=text/html:<style id="css_styles">blockquote.
cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding
-right:0px; border-left: 1px solid #cccccc }\nblockquote.cite2 {margin-le
ft: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; bor
der-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }\na im
g { border: 0px; }\nli[style='text-align: center;'], li[style='text-ali
gn: center; '], li[style='text-align: right;'], li[style='text-align:
right; '] { list-style-position: inside;}\nbody { font-family: Segoe UI
; font-size: 12pt; } \n.quote { margin-left: 1em; margin-right: 1em;
border-left: 5px #ebebeb solid; padding-left: 0.3em; }</style>Test Task Line 1

Test Task Line 2 (both created in Em Client)</div

  1. Now add another 3rd line to the description of the task in the Nextcloud Tasks App. This currently results in something like the following two parameters in the iCalendar item transferred to Em-Client:

X-ALT-DESC;FMTTYPE=text/html:<html><head><style id="css_styles">blockquote.
cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-
right:0px; border-left: 1px solid #cccccc }\nblockquote.cite2 {margin-left
: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border
-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }\na img {
border: 0px; }\nli[style='text-align: center;'], li[style='text-align: c
enter; '], li[style='text-align: right;'], li[style='text-align: right
; '] { list-style-position: inside;}\nbody { font-family: Segoe UI; font
-size: 12pt; } \n.quote { margin-left: 1em; margin-right: 1em; border-
left: 5px #ebebeb solid; padding-left: 0.3em; }</style></head><body>Test
Task Line 1<div>Test Task Line 2 (both created in Em Client)</div></body></
html>
CLASS:PUBLIC
DESCRIPTION:Test Task Line 1\nTest Task Line 2 (both created in Em Client)\n3rd new Line added in Nextcloud\n

  1. Em-Client now shows only the HTML data. That means the 3rd line added in Nextcloud is missing. Once the description is now changed again in Em-Client, the changes added in Nextcloud get lost:

X-ALT-DESC;FMTTYPE=text/html:<style id="css_styles">/*<![CDATA[
/ blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left:
10px; padding-right:0px; border-left: 1px solid #cccccc }\nblockquote.ci
te2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-r
ight:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top:
0px; }\na img { border: 0px; }\nli[style='text-align: center;'], li[s
tyle='text-align: center; '], li[style='text-align: right;'], li[style
='text-align: right; '] { list-style-position: inside;}\nbody { font-fa
mily: Segoe UI; font-size: 12pt; } \n.quote { margin-left: 1em; margi
n-right: 1em; border-left: 5px #ebebeb solid; padding-left: 0.3em; } /

]]

*/</style>Test Task Line 1

Test Task Line 2 (both c
reated in Em Client)
New line added in Em-Client&nbsp;
</b
ody>
CLASS:PUBLIC
DESCRIPTION:Test Task Line 1\nTest Task Line 2 (both created in Em Client)
nNew line added in Em-Client 

Expected behaviour

When the description of a task is changed, the (old) HTML version of it in the X-ALT-DESC field should be cleared just like already implemented for ALTREP in fix 1916 (#1916).

Actual behaviour

See steps to reproduce!

Server configuration

Nextcloud version: 25.0.2

Tasks version: 0.14.5

Clients

Local Calendar Client: Em-Client 8.2.1721
Operating System: Windows 10
Browser: Firefox 111.0 (64-bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants