Item1386: adding a textarea HTML tag into a formfield value will ruin rendering textarea

pencil
Priority: Enhancement
Current State: No Action Required
Released In:
Target Release: major
Applies To: Engine
Component:
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: KennethLavrsen
I presume we should make an effort to stop rendering becoming messed up

-- SvenDowideit - 29 Mar 2009

Looks OK to me - unless you mean an unclosed textarea tag - in which case, why?

Foswiki is a nest of tradeoffs. We allow some things that can mess up rendering, because it gives us extra power in other ways.

I don't think any action is required.

-- CrawfordCurrie - 24 Jun 2010

sadly, I don't agree - there are compromises that cause our users trouble, and so are plausibly not something we need to gloss over as we have done - so I'll just set it to me and you can ignore it that way :/

-- SvenDowideit - 24 Jun 2010

I am very interested in how you are planning to fix this, because I am depending on formfields storing HTML to continue working, ie. richtext formfield type.

To be honest, the functionality you seek could fall out of a reworking of the Foswiki::Forms API, maybe a plugin could clean up or strip malformed HTML on save, etc..

-- PaulHarvey - 24 Jun 2010

Another option, which I've mentioned elsewhere, is perhaps add the ability to control the renderForDisplay a bit better. Sometimes you want $formfield() to render exactly, without newlines being mangled as <br/>, sometimes you want all interesting characters to be encoded as HTML entities, etc.

The question is: Do we do this when defining the formfield (I think yes), or allow $formfield() to take some parameters to control rendering (would be powerful, but we hate extending syntax, and probably dangerous/unforseen problems)

-- PaulHarvey - 24 Jun 2010

I do not see a straight forward bug where we know exactly how things should behave.

You want to start encoding all > or < tags? That means no more html in formfields. That is not a good idea.

You want to treat <textarea a special way? Then how many more special cases do we need to address?

How is this different from being able to put tags in the topic which also goof up the whole page?

I think this is feature proposal material and not a bug report that can be acted on. It will be one of these Waiting For reports that get more than a year old.

I am no actioning this and it should stay so unless there is a specific bug fix with spec that can be proposed to close it.

-- KennethLavrsen - 31 Jul 2010

ItemTemplate edit

Summary adding a textarea HTML tag into a formfield value will ruin rendering textarea
ReportedBy SvenDowideit
Codebase 1.0.4, trunk
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Engine
Component
Priority Enhancement
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease major
ReleasedIn
Topic revision: r7 - 31 Jul 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy