Topic on Talk:Talk pages project/New topic/Flow

HTML entities : mistake when switching from Source to Visual editing modes

3
Ideawipik (talkcontribs)

Hello. Here are the steps to reproduce.

  1. Start a new topic. In Source mode, key in or paste an HTML entity.
    • Example 1 : >
    • Example 2 : [[Page#Tag <li> and…]]
  2. Switch to Visual mode.
  3. Come back to Source mode or save. Entities are now different !
    • Example 1 : >
    • Example 2 : [[Page#Tag <li> and…]]

The latter leads to a bad display and a broken link, since the tag is interpreted as a list item.

Notice that [[Page#Tag &#x3C;li&#x3E; and…]] (Unicode encoding) is also converted into [[Page#Tag <li> and…]] with the same issue.

These inappropriate replacements don't occur with the older tool.

Unrelated remark. The present Structured Discussions (Flow) feature adds unnecessary ="" after the inline attribute in syntaxhighlight tags.

Best regards.

Whatamidoing (WMF) (talkcontribs)

Does this only happen when the link includes a #Section heading? I am wondering whether this is related to w:en:Percent-encoding. & is a 'reserved character' in that scheme.

Tacsipacsi (talkcontribs)
  • First example: can be reproduced without any links in the draft. It just switches to a different encoding, without affecting how the wikitext renders—not nice, but not very bad either.
  • Second example: happens only fragment (section) parts of links—outside of links, or in page title part of links, the first example happens (less than/greater than signs seem to be disallowed in page titles, but not in section titles). This is bad, and should be fixed: it does affect how wikitext renders—it breaks it. Consider this example (I hope Flow won’t mess up more than what I want to be messed up):

How it looks initially:

Page#Tag <li> and…

How it looks after the source→visual→source roundtrip:

[[Page#Tag

  • and…]]
  • Edit: Flow fixed the result even where I didn’t want it to, I had to break it even more. It looks like we have a legacy parser vs Parsoid inconsistency, which not only makes me harder to show the problem, but is also almost certainly the cause of it.