\n in SUMMARY of VEVENT not interpreted

VERIFIED FIXED in 1.0b2

Status

Calendar
Internal Components
VERIFIED FIXED
13 years ago
7 years ago

People

(Reporter: Hadmut Danisch, Assigned: Alexander Shvetsov)

Tracking

unspecified
1.0b2
Bug Flags:
blocking-calendar1.0 +

Details

(Whiteboard: [needed beta][no l10n impact])

Attachments

(6 attachments, 2 obsolete attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

When displaying an internet ics calender file, newlines are not displayed 
correctly. If a text line (e.g. DESCRIPTION or SUMMARY) contains a 
\n Mozilla displays a box with "00 0A" instead of starting a new line.

regards
Hadmut


Reproducible: Always
Steps to Reproduce:
1. Use the given URL as a calender
2. Watch Nov 8 2004
3.

Actual Results:  
a box with "00 0a"

Expected Results:  
A new line

Comment 1

13 years ago
In whic field are you teying to place the \n?  Subject or the description...  I
have it working fine in the description and other text fields, but within the
subject it gives me this results.  The question is:  A subject allowed to have
multiple lines?

If you import this ics into Outlook or other program does it put multiplt lines?

PHPiCalendar work fine with a \n in the subject, but it doe snot let you see the
data after the \n.

Outlook gives you multiple lines, but you can not add additional lines within
outlook.

Comment 2

13 years ago
Sorry, I use the work subject vs. summary.  I ment summary.

Within the RFC 2048 spec, it only inticates the field as TEXT.  I did not find
any adidional text limiting the summary field to one line.
(Reporter)

Comment 3

13 years ago
Hi,

sorry for the delay, I was out of home.

Just see the example given at the  URL. Both the 
summaries and descriptions contain \n. 

Other Calendar tools (e.g. evolution) display it correctly. 

See also bug 251771 for screenshots.

regards
Hadmut

Updated

12 years ago
QA Contact: gurganbl → sunbird
Current situation in Sunbird nightly builds:
In the event dialog we only show one line and see the text before the first '\n'. In the unifinder the complete SUMMARY string is showed, but with black squares instead of the '\n' (under WinXP). The views and the tooltips show the complete SUMMARY string but ignore and omit the '\n'.
Assignee: mostafah → base
Status: UNCONFIRMED → NEW
Component: Sunbird and Calendar-Extension Front End → Base
Ever confirmed: true
OS: Linux → All
QA Contact: sunbird → base
Hardware: PC → All
Summary: \n misinterpreted → \n in SUMMARY of VEVENT not interpreted
Version: unspecified → Trunk

Comment 5

11 years ago
Presumably, this causes dataloss when editing a bug.
Keywords: dataloss
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody

Updated

11 years ago
Target Milestone: --- → Sunbird 0.3

Comment 7

11 years ago
Marked as blocking0.3 in part because the fix seems like it should be easy.  If that turns out to not be true, we may need to reconsider.
Flags: blocking0.3+

Comment 8

11 years ago
After more discussion, we've realized that is arguably not even dataloss, since \n
is actually interpreted in the event dialog these days, so it will be round-tripped, so we're not going to let this block 0.3.

One could imagine a scenario where someone selects stuff with the mouse and thinks that everything is selected, when in fact, everything is not visible, but this seems a total edge case.

We've come up with UI for the event dialog part of this bug, which is to make it the text box be one line tall, but allow a scrollbar to created on overflow.  We'd want to make it hard or impossible for the user to manually add lines to the summary, the overflow would be just to deal with existing data that had this.  Probably a keypress handler would do the trick.

We would be inclined to accept a patch of this nature for 0.3.
Flags: blocking0.3+ → blocking0.3-
Whiteboard: [cal-ui-review+][needs patch]

Updated

11 years ago
Target Milestone: Sunbird 0.3 → Sunbird 0.5
Not going to make the 0.5 train. Moving forward.
Target Milestone: Sunbird 0.5 → Sunbird 0.7

Updated

10 years ago
Flags: wanted-calendar0.8?
Target Milestone: 0.7 → ---
Version: Trunk → unspecified

Updated

10 years ago
Keywords: dataloss

Comment 10

10 years ago
The proposed solution of making it impossible to add more than one line seems more of a workaround to me, and besides, other tools (i.e. GCalendar) we already have a provider for don't set this restriction, so we could easily end up with events with newlines in them.

As stated in bug 401872, I'd be happy to tackle the issue.
Anyone available to assign me this bug?
Assignee: nobody → mcicogni
Status: NEW → ASSIGNED
Duplicate of this bug: 401872
Setting wanted0.8- as the main Calendar developers will not devote any time to
this in the 0.8 timeframe. Patches are, of course, always welcome.
Flags: wanted-calendar0.8? → wanted-calendar0.8-

Comment 13

10 years ago
Created attachment 303139 [details] [diff] [review]
[checked in] Preserve newlines in iMIP display

With this patch newlines are preserved when viewing an iMIP invitation.
Attachment #303139 - Flags: review?(ctalbert)

Comment 14

10 years ago
Comment on attachment 303139 [details] [diff] [review]
[checked in] Preserve newlines in iMIP display

Tested it, looks good. r=ctalbert  

Thanks for the patch!!!
Attachment #303139 - Flags: review?(ctalbert) → review+

Comment 15

10 years ago
Fix checked in on trunk and MOZILLA_1_8_BRANCH --> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Whiteboard: [cal-ui-review+][needs patch] → [cal-ui-review+]
I'm not convinced the bug is fixed. The issues from comment#4 were not connected to iTIP/iMIP.
Target Milestone: --- → 0.8

Updated

9 years ago
Flags: wanted-calendar0.8-
Whiteboard: [cal-ui-review+]
(In reply to comment #16)
> I'm not convinced the bug is fixed. The issues from comment#4 were not
> connected to iTIP/iMIP.

-> Re-opening
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #303139 - Attachment description: Preserve newlines in iMIP display → [checked in] Preserve newlines in iMIP display
Assignee: mcicogni → nobody
Status: REOPENED → NEW
Flags: wanted-calendar0.9?
Keywords: qawanted
Target Milestone: 0.8 → ---

Updated

9 years ago
Flags: wanted-calendar0.9? → wanted-calendar0.9+
This WFM on Mac using the new/prototype event dialog, thus I think the iTIP fix was the only missing piece. Martin, could you please verify on Windows?
Martin, any update?
In the event dialog '\n' is substituted with ',', the unifinder shows some box char, and the calendar views do different things: Day/Week view shows a space, Multiweek/Month shows the same box char as the unifinder.
Created attachment 329664 [details]
ics file

Seems I am missing the point, but subscribing to an ics file containing \n, those are correctly broken into different lines. Could somebody explain what's still missing?
> Seems I am missing the point, but subscribing to an ics file containing \n,
> those are correctly broken into different lines. Could somebody explain what's
> still missing?

Daniel, I think you mixed up SUMMARY and DESCRIPTION of an event. This bug report concerns the SUMMARY of an iCalendar VEVENT, not the DESCRIPTION, i.e. what contains '\n' in your attached ics file.
Ah! Yes, of course. Thanks, Martin.
Even though this is rather exotic (since you cannot edit multi-line titles), what about only showing the first line? Christian, what do you think?

Comment 25

9 years ago
Would be ok for me. Maybe we can show ellipses at the end and on mouse over a tooltip which contains the whole summary.
Keywords: qawanted

Updated

9 years ago
Flags: wanted-calendar0.9+ → wanted-calendar1.0+
(Assignee)

Comment 26

8 years ago
Created attachment 407738 [details]
Representation of SUMMARY with '\n' in different views
(Assignee)

Comment 27

8 years ago
Created attachment 407740 [details]
Inline edit of SUMMARY with '\n' (Lightning & Sunbird, Windows & Linux)

Solution may be divided in 2 steps:
1. Ensure consitent viewing.
\n converts to ' ' in Day and Month views. And it simply eliminates in all other places (see previous attachment).

2. Ensure consitsent editing.
Lightning replaces \n to ',' on Windows and Linux/
Sunbird on Windows allows multiline editing. But on Windows retain only first line (see attachment)
(Assignee)

Comment 28

8 years ago
Created attachment 407742 [details] [diff] [review]
Fix SUMMARY with '\n' viewing

Simply replace \n with ' '

The only XUL element used to display SUMMARY that honor '\n' is <description>. All others just cut it regardless of css.

IMHO it would be better to replace \n with ' ' than all other ways. 
Comma will be unappropriate if line ends with dot. 
Preserve only first line can be misleading.
Attachment #407742 - Flags: review?(mschroeder)
(Assignee)

Comment 29

8 years ago
Created attachment 407743 [details]
Replace for bad picture 407740. Sorry
Attachment #407740 - Attachment is obsolete: true
Assignee: nobody → shv-box
Status: NEW → ASSIGNED
Comment on attachment 407742 [details] [diff] [review]
Fix SUMMARY with '\n' viewing

Shifting review to Philipp ;-)
Attachment #407742 - Flags: review?(mschroeder) → review?(philipp)
Comment on attachment 407742 [details] [diff] [review]
Fix SUMMARY with '\n' viewing

The patch looks fine, but what about other whitespaces? i.e if it contains \r\n ? I'll r+ with this question answered
(In reply to comment #31)
> (From update of attachment 407742 [details] [diff] [review])
> The patch looks fine, but what about other whitespaces? i.e if it contains \r\n
> ? I'll r+ with this question answered

Everything that visually produces a line break should be substituted with a single space imo.
Comment on attachment 407742 [details] [diff] [review]
Fix SUMMARY with '\n' viewing

I've tested all unicode characters noted as whitespace on http://en.wikipedia.org/wiki/Whitespace_character

Only the newline character produces a visual newline. Therefore I think we can take this patch.

Even if \r\n is shortened to \r, the \r is just shown as an empty character.

r=philipp
Attachment #407742 - Flags: review?(philipp) → review+
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/0a7b207c9030>
-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0b2

Comment 35

7 years ago
I am reopening this bug because it causes a regression, when the title is not present this is logged in the error console:
Error: calendarEvent.title is null
Source File: chrome://calendar/content/calendar-unifinder.js
Line: 786
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Interesting, I always thought an empty title would cause an empty string, not null. Alexander, could you prepare a patch to fix this issue?
Flags: wanted-calendar1.0+ → blocking-calendar1.0+
Created attachment 444693 [details] [diff] [review]
Regression Fix - v1

This fixes the regression. Simon, could you do a quick review on this one?
Attachment #444693 - Flags: review?(simon.at.orcl)
Whiteboard: [needed beta][no l10n impact]
Created attachment 444851 [details] [diff] [review]
Regression Fix - v2

Forgot to qref, sorry
Attachment #444851 - Flags: review?(simon.at.orcl)

Comment 39

7 years ago
Comment on attachment 444851 [details] [diff] [review]
Regression Fix - v2

Works fine for me
Attachment #444851 - Flags: review?(simon.at.orcl) → review+

Updated

7 years ago
Attachment #444693 - Attachment is obsolete: true
Attachment #444693 - Flags: review?(simon.at.orcl)
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/987baad2b6cd>
-> FIXED
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Pushed to comm-1.9.2 <http://hg.mozilla.org/releases/comm-1.9.2/rev/b5456784de23>
-> FIXED

Comment 42

7 years ago
verified with
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11pre) Gecko/20100514 Calendar/1.0b2pre
Status: RESOLVED → VERIFIED

Comment 43

7 years ago
(In reply to comment #42)

Damian, please remember that the Sunbird builds are still based on the 1.9.1 branch. None of the patches that were checked in after the 1.0 Beta 1 release are contained in this builds.
You need to log in before you can comment on or make changes to this bug.