Opened 10 years ago

Closed 8 years ago

#3819 closed defect (fixed)

empty cells result in broken table

Reported by: izzy Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


editing a table which contains empty cells results in broken table. Example:

Table before editing:

|| filled cell || || last cell ||

After editing:

||filled cell||||last cell||

all spaces are removed, and Trac fails interpreting this as an empty cell in some circumstances. I'm not sure why and when this happens - I failed provoking this without the plugin. But if it happens, it shows the Pipe symbol (|) within the table cell. And it's not specific to a given branch (0.10 or 0.11).

Suggestion: Leave spaces (or not spaces) as they have been, as long as the user does not edit them. Sometimes there must not be spaces (as with the patch for table headers, where 3 pipes are used to indicate cell borders - inserting spaces here would break again), and sometimes they seem to be needed.

Note: The problem may be caused by the "table header patch" mentioned above, since having e.g. 6 pipes together could be either 3 data cells or 2 header cells - and somehow it fetches the "3" first. So if data cells have been meant, layout is broken by that. The pipe symbol then appears within the cell if you have 4 pipes (i.e. 2 data cells), since first the 3 pipes are matched as TH, and then only one is left, which is taken literally. But this is only one of the cases.

Summary: When converting input to Wysiwyg, don't remove spaces in table cells - but also don't insert additional ones, leave as-is. Same when converting back on submit.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by izzy

Trac Release: 0.100.11

Will there anything be done concerning this issue? Not a rude comment - just a question on what to expect ;)

comment:2 Changed 8 years ago by Jun Omae

Resolution: fixed
Status: newclosed

The latest wysiwyg plugin leaves one space at least around double-pipes.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.