The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

BBCode problem: table tag

2 posters

Go down

BBCode problem: table tag Empty BBCode problem: table tag

Post by Seedling March 5th 2010, 5:31 pm

Whenever I use BBcode table tags in a post, everything between table and /table is put on a single line when the post is edited later.

Code:
[table border="1"]
[tr]
[td]Field 1[/td]
[td]Field 2[/td]
[td]Field 3[/td]
[/tr]
[/table]
Field 1Field 2Field 3

becomes

Code:
[table border="1"][tr][td]Field 1[/td][td]Field 2[/td][td]Field 3[/td][/tr][/table]
Field 1Field 2Field 3

Now imagine it's 40 rows and 12 columns, with a slew of bbcode tags and cell row/colspans... and jumbled together on a single line...
avatar
Seedling
New Member

Posts : 3
Reputation : 0
Language : Dutch

Back to top Go down

BBCode problem: table tag Empty Re: BBCode problem: table tag

Post by ankillien March 6th 2010, 10:11 am

Hello,

This happens because BBCodes ignores unnecessary white space. So it will combine the tags and remove spaces or line breaks.

I don't think you can stop this to happen.
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

BBCode problem: table tag Empty Re: BBCode problem: table tag

Post by Seedling March 7th 2010, 1:43 am

ankillien wrote:Hello,

This happens because BBCodes ignores unnecessary white space. So it will combine the tags and remove spaces or line breaks.

I don't think you can stop this to happen.

This wasn't always the case. I think I started noticing it a few months back, although I thought it was a one-off fluke and didn't bother to check into it further.

The "Insert a Table" button on top will generate a decent looking table, but this gets butchered as well after posting.

It definitely is a bug. Don't you think it's rather odd that user-entered text is turned into a jumbled mess? I don't want to keep offline copies of my posts in a .txt file because some piece of code is corrupting certain pieces of text because they follow a certain format... Rendering BB tags into html should not involve corrupting the original source.
avatar
Seedling
New Member

Posts : 3
Reputation : 0
Language : Dutch

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum