Last modified: 2014-05-19 19:09:05 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 T52587, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50587 - Parse template parameters to DOM or other non-wikitext types where possible
Parse template parameters to DOM or other non-wikitext types where possible
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Marc Ordinas i Llopis
:
Depends on: 51374
Blocks: 50182
  Show dependency treegraph
 
Reported: 2013-07-02 15:43 UTC by Gabriel Wicke
Modified: 2014-05-19 19:09 UTC (History)
4 users (show)

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


Attachments

Description Gabriel Wicke 2013-07-02 15:43:42 UTC
To do this, we will need knowledge of which template parameters can be parsed to DOM or other types and which need to remain wikitext. A start tag parameter should probably not be parsed to DOM for example (as a passed-in start tag would be balanced in the process), while most content parameters can. Apart from wikitext string vs. DOM we could also eventually refine parsing further for things like dates, numbers etc. Our DOM spec for templates [1] is already prepared to represent DOM and other representations of individual parameters. 

The main thing that we'll need for the next step is information on where it is safe to do so. This information can come from something like TemplateData or DBPedia.

[1]: http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Template_content
Comment 1 Marc Ordinas i Llopis 2014-02-12 16:42:08 UTC
My current patch (WIP at https://gerrit.wikimedia.org/r/#/c/110381/ ) crashes on parser test "Templates: Indent-Pre: 1e. Wrapping should be based on expanded content" when testing "{{echo|{{echo| }}bar}}", although the same wt works when using parse.js.

Investigating…
Comment 2 Marc Ordinas i Llopis 2014-03-27 18:31:11 UTC
New patch at https://gerrit.wikimedia.org/r/#/c/121421/
Comment 3 Gerrit Notification Bot 2014-03-28 08:42:03 UTC
Change 121421 had a related patch set uploaded by Marcoil:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/121421
Comment 4 Gerrit Notification Bot 2014-04-08 16:28:03 UTC
Change 121421 merged by jenkins-bot:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/121421
Comment 5 Gerrit Notification Bot 2014-04-08 16:48:22 UTC
Change 123347 had a related patch set uploaded by Marcoil:
Bug 50587: Serialize DOM template parameters back to wikitext

https://gerrit.wikimedia.org/r/123347
Comment 6 Gerrit Notification Bot 2014-04-16 17:22:14 UTC
Change 126725 had a related patch set uploaded by Marcoil:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/126725
Comment 7 Gerrit Notification Bot 2014-04-16 17:33:44 UTC
Change 126725 merged by jenkins-bot:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/126725
Comment 8 Gerrit Notification Bot 2014-04-16 17:38:36 UTC
Change 126730 had a related patch set uploaded by Marcoil:
Bug 50587: Serialize DOM template parameters back to wikitext

https://gerrit.wikimedia.org/r/126730
Comment 9 Gerrit Notification Bot 2014-04-16 17:39:37 UTC
Change 123347 abandoned by Marcoil:
Bug 50587: Serialize DOM template parameters back to wikitext

Reason:
Rebased in https://gerrit.wikimedia.org/r/126730 .

https://gerrit.wikimedia.org/r/123347
Comment 10 Gerrit Notification Bot 2014-04-17 17:30:45 UTC
Change 126730 merged by jenkins-bot:
Bug 50587: Serialize DOM template parameters back to wikitext

https://gerrit.wikimedia.org/r/126730
Comment 11 Gerrit Notification Bot 2014-05-06 16:49:45 UTC
Change 131729 had a related patch set uploaded by Marcoil:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/131729
Comment 12 Gerrit Notification Bot 2014-05-06 16:49:50 UTC
Change 131730 had a related patch set uploaded by Marcoil:
Bug 50587: Serialize DOM template parameters back to wikitext

https://gerrit.wikimedia.org/r/131730
Comment 13 Gerrit Notification Bot 2014-05-06 16:58:00 UTC
Change 131729 merged by jenkins-bot:
Bug 50587: Parse template parameters to DOM or other non-wikitext types where possible

https://gerrit.wikimedia.org/r/131729
Comment 14 Gerrit Notification Bot 2014-05-06 16:58:47 UTC
Change 131730 merged by jenkins-bot:
Bug 50587: Serialize DOM template parameters back to wikitext

https://gerrit.wikimedia.org/r/131730
Comment 15 Marc Ordinas i Llopis 2014-05-19 07:16:10 UTC
This has been merged into master, but it's not enabled by default. To test it out, add

parsoidConfig.addHTMLTemplateParameters = true;

to localsettings.js, or use the option --addHTMLTemplateParameters=true with command line tools.
Comment 16 Gabriel Wicke 2014-05-19 19:09:05 UTC
Current status: This is not yet enabled in production while we are investigating the performance impact.

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


Navigation
Links