Last modified: 2014-01-02 22:06:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T56877, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 54877 - Parsoid treats [[[[Foo]]]] as plain text, but the PHP parser treats it as [[<a href="Foo">Foo</a>]]
Parsoid treats [[[[Foo]]]] as plain text, but the PHP parser treats it as [[<...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Lowest normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-02 15:17 UTC by Elitre
Modified: 2014-01-02 22:06 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Elitre 2013-10-02 15:17:10 UTC
(Where the word is the actual working part of the element).
Probably not a real bug, since it is triggered by a user mistake (who should remove the brackets), but since it's easily reproduceable, here are the steps:
take any <nowiki>[[link]]</nowiki> created like this (by ignoring the markup warning).
VEdit the page and use the linking tool on the word inside the brackets.
Save, you now have [[[[link]]]], and of course the nowiki tags are gone.

https://www.mediawiki.org/w/index.php?title=User:Elitre_(WMF)/SandboxVE&diff=prev&oldid=794483

https://www.mediawiki.org/w/index.php?title=User%3AFram%2FSandbox&diff=794473&oldid=794472

Just interested in understanding whether VE wants or can do something about it.

(Note that it is absolutely possible to get the same result with the traditional editor as well, https://sl.wikipedia.org/w/index.php?title=Klerofa%C5%A1izem&diff=next&oldid=4101482 ).
Comment 1 Krinkle 2013-10-02 15:40:35 UTC
This is probably a bug in Parsoid, not VisualEditor.

Given a page containing:

[[[[Sandbox]]]]

Which contains no <nowiki>, this is parsed as [[<a href=Sandbox>Sandbox</a>]] by the PHP parser and renders accordingly.

When editing that page in VisualEditor, the initial rendering is wrong (it renders as a text node "[[[[Sandbox]]]]", no anchor link).

If I add text to that line or change the word to something else, the serialisation from Parsoid is still the same (no <nowiki> is inserted, so Parsoid is unaware of it being a link both in parsing and serialising).


Given a page containing:

<nowiki>[[[[Sandbox]]]]</nowiki>

When editing that in VisualEditor, the initial rendering is correct (1 text node containing "[[[[Sandbox]]]]").

If I add text to that line or change the word to something else, the serialisation from Parsoid is no longer the same. It dropped the <nowiki>, thus effectively (according to the PHP parser) turning it into a link after saving.
Comment 2 Krinkle 2013-10-02 15:43:42 UTC
Rephrasing bug. A user would not have a goal to generate 4 brackets in wikitext, but the use case of typing (or editing existing pages that do have) [[ around a link, that is genuine content that VisualEditor should be able to create and edit.
Comment 3 James Forrester 2013-10-04 00:15:39 UTC
Re-re-phrasing the title (and yes, this appears to be a Parsoid bug, but a very low priority one).
Comment 4 Gerrit Notification Bot 2013-12-31 00:10:49 UTC
Change 104695 had a related patch set uploaded by Subramanya Sastry:
WIP (Bug 54877) Tokenize [[[[Foo]]]] correctly

https://gerrit.wikimedia.org/r/104695
Comment 5 Gerrit Notification Bot 2014-01-02 22:05:51 UTC
Change 104695 merged by jenkins-bot:
(Bug 54877) Tokenize [[[[Foo]]]] correctly

https://gerrit.wikimedia.org/r/104695

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links