https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=11813541
For some reason, putting <nowiki> inside of {{code}} breaks in the app. It results in the nowiki tag being displayed (when it obviously shouldn’t) and completely breaks section editing for that section and every subsequent session. The first screenshot shows the nowiki tag being rendered. The second shows the editor when you try to edit that section (though, given how broken it is, you could also say that’s the edit screen for the section after that.). The third is the editor from mobile Wikipedia in the DuckDuckGo browser.
Given that HTML tags are not supposed to be rendered—even when surrounded by {{code}}, <code>, <nowiki>, or <syntaxhighlight> (or any tag, really) unless the angle brackets are escaped, I highly, highly doubt that this is intended behavior.
I’m honestly not sure how this is happening. If I recall MW converts wikitext server-side. So, it’s not like the web version and app version could diverge in that regard. If I had any guess, MW preserves the nowiki and syntaxhighlighting tags in the output, and some client-side implementation of syntaxhighlighting or code is taking the expanded content of the tag as plain text instead of HTML.
In the browser, tags themselves never render in the page (Eg: “<p>blah</p>“ only renders “blah” not “<p>blah</p>“) no matter what implementation is used, but the rendering system in the app does render them in select cases like this.
It’s like if, in JS, I did HTMLElement.innerHTML and applied the styling to that instead of node.textContent.For
<code>{1, 2, 3<nowiki>}</nowiki></code>
HTMLElement.innerHTML would return
{1, 2, 3<nowiki>}</nowiki> (as appears in the SC)
but Node.textContent gets:
{1, 2, 3} (as should be displayed)Well, I haven’t looked at the source of the app on GitHub, so I don’t have a clue why, but I suppose this is why. It might not be as simple as using something like Node.textContent either to strip the tags, either. Eg:
<code><b>bold text</b>{3<nowiki>}</nowiki></code>
Should display as:
bold text{3}
Doing HTMLElement.innerHTML would do:
<b>bold text</b>{3<nowiki>}</nowiki>
Doing Node.textContent would do:
bold text{3}You can see the bug here: https://en.wikipedia.org/wiki/M-expression#Implementations.
Version: WikipediaApp/6.8.0.1808 (iOS 14.4.2; Phone)
Anyway, thanks for making a great app and good luck fixing this, assuming you don’t already know about it. (I kinda feel like you have to know about it with how common curly brackets are in code template calls across Wikipedia. I find it very hard to believe that nobody hasn’t already reported this as a result)


