Page MenuHomePhabricator

Flow: Score vorbis content doesn't roundtrip (html/wikitext) properly
Closed, ResolvedPublic

Description

If I paste the short example from [[mw:Extension:Score]]:

<score vorbis="1">\relative c' { f d f a d f e d cis a cis e a g f e }</score>

into a Flow post, save, and then re-edit that post, then it shows all of this in the edit-area:

<score vorbis="1">\relative c' { f d f a d f e d cis a cis e a g f e }</score>
<span></span><div class="mediaContainer" style="position:relative;display:block;width:300px"><audio id="mwe_player_0" style="width:300px" poster="bits.wikimedia.org/static-1.25wmf6/resources/assets/file-type-icons/fileicon-ogg.png" controls="" preload="none" class="kskin" data-durationhint="11.600453514739" data-disablecontrols="options,timedText"><source src="upload.wikimedia.org/score/j/q/jqn99bwy8777srpv45hxjoiu24f0636/jqn99bwy.ogg" type="audio/ogg; codecs=&quot;vorbis&quot;"></source>Sorry, your browser either has JavaScript disabled or does not have any supported player.<br>
You can [//upload.wikimedia.org/score/j/q/jqn99bwy8777srpv45hxjoiu24f0636/jqn99bwy.ogg download the clip] or [https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:TimedMediaHandler/Client_download download a player] to play the clip in your browser.</audio></div>

None of that new content should be there.


Version: unspecified
Severity: normal
See Also:
T64270: Support video and audio content

Details

Reference
bz72912

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 4:00 AM
bzimport set Reference to bz72912.
bzimport added a subscriber: Unknown Object (MLST).

Do you actually see the raw HTML (i.e. do you actually see the text <span> in the normal view), or is is rendered?

(In reply to Matthew Flaschen from comment #1)

Do you actually see the raw HTML (i.e. do you actually see the text <span>
in the normal view), or is is rendered?

It looks normal after the first save.

But if I re-save it, then everything breaks.

test posts (and one unrelated File: test) at: https://www.mediawiki.org/wiki/Topic:S3s627my4r0vumio#flow-post-s5fhw7x6j7xsbrkv

Created attachment 17108
HTML in the wikitext edit box

Thanks. I see what you mean now. Basically, it's not back-converted to wikitext properly. That means that what should be wikitext in the edit box includes HTML.

When this is resaved, it gives predictably nonsensical results (e.g. treating the HTML5 source tag as the SyntaxHighlight Geshi source tag).

Attached:

Flow_and_Score_-_HTML_in_wikitext.png (186×732 px, 26 KB)

Created attachment 17109
When bogus wikitext is resaved result is wrong

Attached:

Flow_and_Score_-_HTML_in_wikitext_after_resave.png (650×468 px, 40 KB)

I tested with http://parsoid-lb.eqiad.wikimedia.org/ (the round-trip form is down, but I could do wikitext -> HTML and HTML -> wikitext), and it works. So the error seems to be on our side.

matthiasmullie renamed this task from Flow: Score vorbis content gets expanded to Flow: Score vorbis content doesn't roundtrip (html/wikitext) properly.Dec 10 2014, 3:51 PM
matthiasmullie triaged this task as Medium priority.
matthiasmullie set Security to None.

The HTML generated by flow-parsoid-utils wikitext->html is slightly different than that of http://parsoid.wmflabs.org/_wikitext/. Sending the latter back through flow-parsoid-utils html->wikitext works.

For future reference, http://parsoid.wmflabs.org should be avoided, since it is not production and not always updated promptly (I learned this the hard way).

In T74912#972469, @Mattflaschen wrote:

For future reference, http://parsoid.wmflabs.org should be avoided, since it is not production and not always updated promptly (I learned this the hard way).

We plan to shut down the wmflabs instance .. see T78095.
You can now access the latest version of parsoid (updated nightly => can have broken code occasionally) via http://parsoid-tests.wikimedia.org/parsoid/
http://parsoid-tests.wikimedia.org/parsoid/_version will tell you what version is running.

Since this server also runs several services, the server might occasionally be slower in its response time.