cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
You are here: Foswiki>Tasks Web>Item11440 (22 Mar 2014, GeorgeClark)Edit Attach

Item11440: Inside formatted text, tags are lost in WYSIWYG transition

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.5
Target Release: patch
Applies To: Extension
Component: WysiwygPlugin
Branches: Release01x01 trunk
Reported By: JayenAshar
Waiting For:
Last Change By: GeorgeClark
If you edit and save this in the WYSIWYG,

this will
disappear.
 and
 this will be surrounded by stars

-- JayenAshar - 14 Jan 2012

As we are talking about data loss (well, loss of formatting), I raised this to urgent.

-- PaulHarvey - 14 Jan 2012

Confirmed on foswiki.org/Sandbox (1.1.4). Not happening on trunk (though the tags are converted to starred wikitext)

-- PaulHarvey - 14 Jan 2012

data loss and/or loss of formatting, depending on (i think) line breaks. displayed text should NOT disappear. the stars are undesirable, but not unusable.

-- JayenAshar - 14 Jan 2012

I was able to save things using sticky tags around the pre block. Putting sticky tags around the b removed the line-starting space character. Using Set WYSIWYGPLUGIN_STICKYBITS = pre.*= had no effect.

-- JayenAshar - 15 Jan 2012

IDEA! To whoever fixes this: please see if this also closes Item11471

-- PaulHarvey - 27 Jan 2012

Assuming this is a related problem, but:

This will disappear,
leaving an empty pre-tag

As will
this.

Note that it's not just the tag that is lost. It is the text within the tag (sometimes).

-- JayenAshar - 28 Jan 2012

found one problem: Node.pm, line 1131 should be a single-line regex:
    $contents =~ /^($WC::WS)(.*?)($WC::WS)$/s;

-- JayenAshar - 12 Feb 2012

and another change: Node.pm, line 1633 shouldn't convert html2tml in pre tags:
            $options | $WC::NO_BLOCK_TML | $WC::BR2NL | $WC::KEEP_WS );

-- JayenAshar - 12 Feb 2012

See attached patch for test cases.

-- JayenAshar - 12 Feb 2012

Thanks Jayen, patch applied.

-- CrawfordCurrie - 09 Mar 2012

Thanks. As soon as I get selenium working, I'll commit some selenium tests.

-- JayenAshar - 10 Mar 2012
 
Topic revision: r24 - 22 Mar 2014, GeorgeClark - This page was cached on 21 Jun 2018 - 18:52.

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