"bdi" tags automatically copied to wikitext break links
Closed, ResolvedPublic

Description

In the new "source editor" part of VisualEditor, when copying log entries into wikitext, a "bdi" html tag gets inserted around usernames. You can see this here: https://en.wikipedia.org/w/index.php?title=User_talk:ToBeFree&diff=846966722&oldid=846966405&diffmode=source You can also see that it breaks the wikitext, so it's not just a style issue -- it's a real bug. Thank you very much in advance. :)

Event Timeline

Additional note: I have manually removed the "bdi" tags from the second line; they did appear there too.

Vvjjkkii renamed this task from Please do not copy "bdi" tags into generated wikitext to nhaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
ToBeFree renamed this task from nhaaaaaaaa to Please do not copy "bdi" tags into generated wikitext.Jul 1 2018, 3:39 AM
ToBeFree raised the priority of this task from High to Needs Triage.
ToBeFree updated the task description. (Show Details)
ToBeFree added a subscriber: Aklapper.
Deskana subscribed.

bdi tags are "bi-directional isolation" tags that preserve the ordering of things when LTR and RTL text is mixed. This is especially important when the username itself might be in, say, Arabic, but the rest of the content is in English. bdi tags are perfectly valid HTML, and they don't "break the wikitext", as it renders just fine afterwards; see https://en.wikipedia.org/wiki/User:Deskana_(WMF)/bdi for an example where I copied an entry from recent changes.

I'm against stripping arbitrary tags in general, and even more against it when those tags are important for internationalisation.

Thank you :)

However, there is a problem. If you look at your own example again, you will notice that the IP is not clickable.

Or here: https://en.wikipedia.org/w/index.php?title=User_talk:ToBeFree&diff=848811057&oldid=848701067&diffmode=source#BDI_tags_break_wikilinks:_Proof

The usernames are not clickable, not blue, not links.

Can we at least mark this as duplicate of another, more specific bug? Or rephrase the title of this one here? Simply "declining" it does not appear to be constructive.

ToBeFree renamed this task from Please do not copy "bdi" tags into generated wikitext to "bdi" tags automatically copied to wikitext break links.Jul 4 2018, 1:52 PM

[…] The usernames are not clickable, not blue, not links.

You didn't mention this in your initial bug report, and only mentioned removing the tags, so I didn't know that was what you meant. Please be as specific as possible.

Can we at least mark this as duplicate of another, more specific bug? Or rephrase the title of this one here? Simply "declining" it does not appear to be constructive.

Declining the task was appropriate given the initial description you put in. Now that you've made the specific problem you're having more clear, this task is good.

This isn't a problem with the visual editor. What the visual editor is doing is perfectly valid: the tags are there when you copy them, and so when you choose to paste as rich text, it puts the tags in.

I spent some time investigating this, and by what I think was a total fluke, I think I discovered the cause. I found that the problem exists on the English, French, and Portuguese Wikipedias, but does not exist on the German, Swedish, and Dutch Wikipedias. There's a pattern here: all the former wikis are using Tidy, and all the latter wikis are using RemexHtml. By pure coincidence, RemexHtml is planned to be turned on everywhere tomorrow, so I suspect this bug will resolve itself then.

Deskana claimed this task.
Deskana triaged this task as Medium priority.

This is fixed now. Pages will need to be reparsed before the links show; that will happen eventually on its own, but you can speed it up by editing or purging the page.