• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5211: EditTablePlugin with a text area keeps adding spaces after a %BR%

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension EditTablePlugin Urgent Closed   minor 4.2.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

EditTablePlugin with a text area keeps adding spaces after a %BR>%

Here is an example

Shortinfo: blablabla
http://twiki.org
lurking around

Use the edit table function repeatedly and watch how more and more spaces are added after the break. To the user this is very visible in edit mode and must be disturbing.

The reason for this is that since 4.1.2 versions of the plugin it seems that each time you do an edit cycle there is a conversion happening between <br /&gt and %BR%

The value of %BR% is defined with a trailing space and this was deliberately added to solve Item3883 so we should not just remove this trailing space. The traling space enables rendering of TML and URLs in table textareas and in bullets with line breaks. This is important and it was a huge help for my users that kept on running into this problem.

But with the new EditTablePlugin behaviour of turning the html break into a TWiki variable break each time you edit this trailing space in the BR definition gets added again and again. We should fix that. It cannot be too difficult so I put this one urgent because it will affect any user of the plugin using textareas.

Note: This bug report is split out from Item5208

-- TWiki:Main/KennethLavrsen - 05 Jan 2008

I see now that the space is added by the conversion from %BR% to <br /> by the core code.

Note that the spaces still give problems, even outside a table:

blablabla%BR%http://twiki.org%BR%_lurking around_%BR%*bold*%BR%

blablabla
http://twiki.org
_lurking around_
*bold*

So to get TML rendered you need to add the spaces:

blablabla%BR%http://twiki.org%BR% _lurking around_ %BR% *bold* %BR%

blablabla
http://twiki.org
lurking around
bold

-- TWiki:Main.ArthurClemens - 05 Jan 2008

My fix: remove added space after %BR% during editing; add space before linebreak to enable TML expansion.

-- TWiki:Main.ArthurClemens - 05 Jan 2008

I have now added a space before each linebreak to allow TML expansion. This is only shown in view mode, not added on save.

Test:

| Shortinfo: | blablabla%BR%there's still a bug%BR%lurking around%BR%_italic_%BR%*bold* %EDITCELL{textarea,6x40,}% | 

Shortinfo: blablabla
there's still a bug
lurking around
italic
bold

-- TWiki:Main.ArthurClemens - 06 Jan 2008

ItemTemplate
Summary EditTablePlugin with a text area keeps adding spaces after a %BR%
ReportedBy TWiki:Main.KennethLavrsen
Codebase 4.2.0, ~twiki4
SVN Range TWiki-4.3.0, Sun, 30 Dec 2007, build 16120
AppliesTo Extension
Component EditTablePlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:16147 TWikirev:16148 TWikirev:16158 TWikirev:16159
TargetRelease minor
ReleasedIn 4.2.0
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r5 - 2008-01-06 - ArthurClemens
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback