Replied on the task.

On Mon, May 4, 2015 at 9:58 AM, Arlo Breault <abreault@wikimedia.org> wrote:
On Wednesday, April 22, 2015 at 9:11 AM, Vadim Shlyakhov wrote:
> Hi!,
>
> Like before I'm playing with a wiki with quite an old Mediawiki installed (http://www.cruiserswiki.org/wiki/Special:Version)
>
> We have a Widgets (http://www.mediawiki.org/wiki/Extension:Widgets) extension installed and it appears we are not able to render a result from #widget parser function there.
>
> For example, at http://www.cruiserswiki.org/wiki/User:Vadim/Sandbox3 we have:
>
> > <nowiki>{{</nowiki>#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
> >
> > {{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
> >
> > <nowiki>{{</nowiki>#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
> >
> > {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
> which renders to
> > {{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
> > 41.245666666667
> > {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
> > 9.1988333333333
>
>
>
> but the Parsoid gives:
>
> > {{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
> >
> > {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
> Actually in HTML code I see:
>
> > <!-- ENCODED_CONTENT PCEtLQotLT48IS0tCi0tPjQxLjI0NTY2NjY2NjY2Nw== -->
>
> and
>
> > <!-- ENCODED_CONTENT PCEtLQotLT48IS0tCi0tPjkuMTk4ODMzMzMzMzMzMw== -->
>
> which gives 41.245666666667 and 9.1988333333333 if base64-decoded.
>
> I'm quite confused about this behaviour.
>
> I wonder if someone could help me to solve this issue.
The issue is that Parsoid doesn’t have a mechanism to register hooks,
https://github.com/wikimedia/mediawiki-extensions-Widgets/blob/master/Widgets.php#L68

`WidgetRenderer::outputCompiledWidget` would normally decode that content.

See https://phabricator.wikimedia.org/T55874 to track the issue.

>
> Thanks
>
> Vadim
> _______________________________________________
> Wikitext-l mailing list
> Wikitext-l@lists.wikimedia.org (mailto:Wikitext-l@lists.wikimedia.org)
> https://lists.wikimedia.org/mailman/listinfo/wikitext-l




_______________________________________________
Wikitext-l mailing list
Wikitext-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitext-l



--
Gabriel Wicke
Principal Engineer, Wikimedia Foundation