• 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.

As demonstrated on TWiki:Codev.SomeBrowsersLoseMoreNewlines, some browsers loose either trailing newlines (Konqueror 3.4.2) or both leading and trailing newlines (Firefox 1.5) when text is passed in hidden URL parameters.

We struggled around a similar issue with the textarea TWiki:Codev.SomeBrowsersLoseInitialNewlineInTextArea and fixed it by sending a blank before the leading newline.

We need to do something like that also when sending through hidden parameters (e.g., when going from edit to save). It can be easily verified that these newlines disappear.

I set this as "requirement" as I assume that no text should be lost. -- TW


In TWiki:Plugins.EditContib I am putting spaces around the passed parameter, albeit there might be a better strategy. -- TW


There is no obvious systemic solution to this. Anyone can slap a hidden parameter anywhere in a topic, in a template, or in a plugin. We could certainly work around it, but wouldn't a better strategy be to drive back on the people who write the broken browsers? CC

I can't reproduce this; can you please privode a recipe for demonstrating the problem? Thx,#

CC

Please go to TWiki:Codev.SomeBrowsersLoseMoreNewlines, and try with Konqueror 3.4.2 or Firefox 1.5. (See above.) -- TW


No, I understand the principle, what I can't find is any specific case of this in the TWiki code. I think we need to HTML encode hiddens. Realising this I recently added type="html" to ENCODE; but I need to know where it is used to be able to apply it. And there is no simple fix for user-entered hiddens, like the ones in your example frown

CC

0h, sorry. I ran into this in the plugins that are based on TWiki:Plugins.EditContrib. You can see this behavior also when you go into preview before saving. -- TW

OK, I understand. You can deal with this behaviour as follows. Instead of using a hidden for a multi-line value, use:

<textarea style="display:none">
My multiline text
</textarea>
As far as I can tell there is no problem in the core, so I have to discard this. Re-open it against an extension if you need to track.

CC

ItemTemplate
Summary Text passed in hidden URL parameters looses newlines on some browsers
ReportedBy TWiki:Main.ThomasWeigert
Codebase 4.0.2
SVN Range TWiki-4.1-beta1, Mon, 24 Jul 2006, build 11161
AppliesTo Engine
Component

Priority Urgent
CurrentState No Action Required
WaitingFor

Checkins 11515
TargetRelease n/a
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2006-10-01 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback