https://bugzilla.wikimedia.org/show_bug.cgi?id=56820

Andrew Garrett <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected]
          Component|Flow                        |General
            Version|master                      |unspecified
           Assignee|[email protected]. |[email protected]
                   |org                         |
            Product|MediaWiki extensions        |Parsoid

--- Comment #3 from Andrew Garrett <[email protected]> ---
Reproducible (see below) using ParsoidUtils, so I think it's safe to say that
this is a problem either with Parsoid or the way we're calling it.

At first blush, it looks like Parsoid is retrieving old revisions and mangling
their text with whatever it's asked to produce when it's given HTML and asked
to turn it into wikitext.

Minimal test case on my local box:

> $wikitext = '[http://en.wikipedia.org/ An external link]';

> print $html = Flow\ParsoidUtils::convert( 'wikitext', 'html', $wikitext )
<p data-parsoid='{"dsr":[0,57,0,0]}'><a rel="mw:ExtLink"
href="http://en.wikipedia.org/";
data-parsoid="{&quot;targetOff&quot;:26,&quot;contentOffsets&quot;:[26,42],&quot;a&quot;:{&quot;href&quot;:&quot;http://en.wikipedia.org/&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;his
is Andrew's test wik&quot;},&quot;dsr&quot;:[0,57,26,1]}">An external
link</a></p>
> print Flow\ParsoidUtils::convert( 'html', 'wikitext', $html )
[his is Andrew's test wik An external link]

And on ee-flow:

> $wikitext = '[http://en.wikipedia.org/ An external link]';

> print Flow\ParsoidUtils::convert( 'wikitext', 'html', $wikitext )
<p data-parsoid='{"dsr":[0,318,0,0]}'><a rel="mw:ExtLink"
href="http://en.wikipedia.org/";
data-parsoid='{"targetOff":26,"contentOffsets":[26,42],"a":{"href":"http://en.wikipedia.org/"},"sa":{"href":"his
is a \"labs\" test wik"},"dsr":[0,318,26,1]}'>An external link</a></p>
> print $html = Flow\ParsoidUtils::convert( 'wikitext', 'html', $wikitext )
<p data-parsoid='{"dsr":[0,318,0,0]}'><a rel="mw:ExtLink"
href="http://en.wikipedia.org/";
data-parsoid='{"targetOff":26,"contentOffsets":[26,42],"a":{"href":"http://en.wikipedia.org/"},"sa":{"href":"his
is a \"labs\" test wik"},"dsr":[0,318,26,1]}'>An external link</a></p>
> print Flow\ParsoidUtils::convert( 'html', 'wikitext', $html )
[his is a "labs" test wik An external link]

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to