https://bugzilla.wikimedia.org/show_bug.cgi?id=55682
Web browser: ---
Bug ID: 55682
Summary: ParsoidUtils does not roundtrip wikitext and HTML
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Flow
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
The issue is that it uses the Visual Editor API, which does not use Parsoid for
Wikitext->HTML transformation. This means that the HTML does not contain
Parsoid markup, so it cannot be safely roundtripped.
The offending revision is c72c0ce45ab0b4312a8b839be47da4d424ada659.
A minimal test case follows:
> $wikitext = '[[Foo bar baz]]'
> print $html = Flow\ParsoidUtils::convert( 'wikitext', 'html', $wikitext )
<p><a href="/mw-dev/index.php?title=Foo_bar_baz&action=edit&redlink=1"
class="new" title="Foo bar baz (page does not exist)">Foo bar baz</a>
</p>
> print Flow\ParsoidUtils::convert( 'html', 'wikitext', $html )
<a href="/mw-dev/index.php?title=Foo_bar_baz&action=edit&redlink=1" class="new"
title="Foo bar baz (page does not exist)">Foo bar baz</a>
I could fix this by reverting the offending changes, but I wanted to discuss it
first to check if we're better off (a) modifying VE; (b) calling VE in a
different way; (c) changing ParsoidUtils to call Parsoid directly itself; or
(d) Refactoring Parsoid itself so that Parsoid provides the interface to its
own API rather than expecting individual extensions to contact it. My
preference is actually for (d), but it might require some discussion with VE /
Parsoid teams (CC'd)
--
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