Item2259: Anything inside HTML tag BIG gets discarded

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Extension
Component: WysiwygPlugin
Branches:
Reported By: SinnerBOFH
Waiting For:
Last Change By: KennethLavrsen
Any text pasted into the WysiwygPlugin editor containing the HTML tag BIG will be discarded.

To reproduce,
  • create any simple valid XHTML webpage
  • include some text inside a <BIG> tag
  • view the web page with Firefox
  • copy the page and paste it into a new wiki page in Foswiki 1.0.7
  • save the page
  • observe how the text inside the BIG tag is gone bye-bye

In #foswiki irc:

[10:47] <SinnerP> any area inside <big>....</big> gets discarded
[10:48] <MTempest> SinnerP: Ooh - I see. That is nasty. Please create a task for this, if you haven't already
[10:49] <SinnerP> ok
[10:49] <MTempest> Please mark it applicable to the WysiwygPlugin extension.

-- SinnerBOFH - 15 Oct 2009

Confirmed, raising to urgent.

-- MichaelTempest - 15 Oct 2009

I do not think pasting in HTML BIG is that normal and for sure we have 100 more html cases that do not survive. It cannot be a release blocker for 1.0.

Downgrading to normal.

-- KennethLavrsen - 18 Oct 2009

WysiwygPlugin discards the content of <big> tags. That is what Foswiki::Plugins::WysiwygPlugin::HTML2TML::Node::_handleBIG does. I do not know why this was done, though.

There are several tags that are discarded - contents and all - and I do not think they should be:
Tag that is discarded Similar or related tags that are not discarded Comments
big small tt i b  
caption thead tbody tfoot  
noframes frameset frame  
noscript script  
var em strong cite kbd samp dfn  

Crawford - what breaks if we change WysiwygPlugin to _flatten these tags instead of discarding them?

-- MichaelTempest - 20 Nov 2009

It seems like a mistake. My reaction is that _flatten would be appropriate. Perhaps over the years this is the fragments of an effort to avoid HTML tags in topics, or maybe at some point these tags crashed the WYSIWYG editor of the day?

Moving forward, such efforts should lie in what we're talking about in WysiwygContentPolicies. I'm sorry I can't offer more clear insight than that.

-- PaulHarvey - 30 Nov 2009

Okay - I changed it to flatten the tag i.e. keep the content but remove the tag itself. If the <big> tag is important, then I suggest the tag should be wrapped in a <literal> or <sticky> block.

Fixed in 1.1

-- MichaelTempest - 26 Jun 2010

ItemTemplate edit

Summary Anything inside HTML tag BIG gets discarded
ReportedBy SinnerBOFH
Codebase 1.0.7
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component WysiwygPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:517df5f80798 distro:ee69d6b58ea0
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r16 - 04 Oct 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