Confirmed Excel tables with right-aligned cells are still broken when pasted into the editor in XenForo 2.3.13

Silmarillion

Active member
Licensed customer
Affected version
2.3.13
XenForo version: 2.3.13

I can reproduce an issue when copying a table from Microsoft Excel and pasting it into the XenForo editor.

The problem appears to be related specifically to right-aligned cells, which is particularly relevant because Excel right-aligns numerical values by default.

Steps to reproduce:

  1. Create a table in Microsoft Excel containing text and numerical values.
  2. Leave the numerical cells right-aligned (Excel's default formatting for numbers).
  3. Copy the table from Excel.
  4. Paste it into the XenForo 2.3.13 rich-text editor.
  5. Submit the post.
Actual result:

The table is partially broken. XenForo prematurely closes the table and some of the remaining cells are displayed as raw BB code in the submitted post.

Looking at the BB code after the conversion, the table has been closed with:

Code:
[/TR]
[/TABLE]

[RIGHT][td width="37px"]
(1)
[/td]
[td width="34px"]
89
[/td]
[td width="54px"]
82,82
...
[/td][/RIGHT]

In other words, the [*TABLE] has already been closed while additional [*td] elements are subsequently placed inside a [*RIGHT] block. These cells are therefore outside a valid [*TABLE] / [*TR] structure and are displayed as raw BB code.

Important finding / workaround:

The issue is reproducible based on the alignment in Excel.
If I select the same table in Excel and change all cells to left-aligned before copying it into XenForo, the table is pasted and submitted correctly.
So:
Excel table with right-aligned numerical cells → broken table
Same Excel table with all cells left-aligned → works correctly

This makes the issue reliably reproducible and strongly suggests that the HTML-to-BB-code conversion of right-aligned table cells is still causing a problem.
Additional testing:
Creating a table directly using XenForo's native table button works correctly. The table can be created, edited, submitted and displayed without any problems.
Therefore, this does not appear to be a general table rendering issue. It specifically occurs when a formatted table is copied from Excel into the XenForo editor.
This is currently reproducible on XenForo 2.3.13.
There was a previous report concerning Excel/spreadsheet copy-and-paste problems in XenForo 2.3, so this may be related to that issue. However, the right-aligned Excel-cell case described above is still reproducible on the current 2.3.13 installation.
Can this please be investigated?
 
Back
Top Bottom