Last modified: 2013-06-05 18:00:03 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 T48470, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46470 - Parsoid: Preserve HTML entities in {{DEFAULTSORT}} values on round-trip
Parsoid: Preserve HTML entities in {{DEFAULTSORT}} values on round-trip
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: ssastry
: easy
Depends on:
Blocks: 39597
  Show dependency treegraph
 
Reported: 2013-03-22 23:00 UTC by Roan Kattouw
Modified: 2013-06-05 18:00 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2013-03-22 23:00:48 UTC
Right now, I get:

$ echo '{{DEFAULTSORT:foo}}' | node js/tests/parse.js 
<body data-parsoid='{"dsr":[0,20,0,0]}'><span data-parsoid='{"tsr":[0,19],"src":"{{DEFAULTSORT:foo}}","dsr":[0,19,null,null]}' about="#mwt1" typeof="mw:Object/Template"></span><meta about="#mwt1" property="mw:TemplateParams" content='[{"id":"mwt1","target":"DEFAULTSORT:Foo","params":{}}]'>
</body>

So {{DEFAULTSORT:foo}} is simply interpreted as a template. For bug 46465, I would like this to be its own RDFa type instead, just like __NOTOC__
Comment 1 Gabriel Wicke 2013-03-28 19:57:00 UTC
This can be handled in the template handler (js/lib/ext.core.TemplateHandler.js). The key should be case-insensitive, and should support aliases. This is already partly handled in the TemplateHandler (search for translatedPrefix).

A localized DEFAULTSORT call should also round-trip properly (preserving the original key and value. This will require adding some support for this in the WikitextSerializer.

The expected output is described in http://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Category_default_sort_key.
Comment 2 Gabriel Wicke 2013-03-28 20:46:27 UTC
Sam Bleckley is planning to work on this. He is not yet on bugzilla, so I can't assign to him. Assigning to myself as a stand-in.
Comment 3 Gerrit Notification Bot 2013-04-17 00:27:35 UTC
Related URL: https://gerrit.wikimedia.org/r/59565 (Gerrit Change I0d4c2b3d087fba700f91c2714cec5b8933882ca0)
Comment 4 Gabriel Wicke 2013-04-17 00:29:00 UTC
Basic support was implemented by Toby Hutton in the patch above. Editing support is still missing, but should not be too hard to add.
Comment 5 Gerrit Notification Bot 2013-04-22 15:59:15 UTC
https://gerrit.wikimedia.org/r/59565 (Gerrit Change I0d4c2b3d087fba700f91c2714cec5b8933882ca0) | change APPROVED and MERGED [by jenkins-bot]
Comment 6 Roan Kattouw 2013-04-26 22:45:08 UTC
(In reply to comment #4)
> Basic support was implemented by Toby Hutton in the patch above.
Thanks, Toby!

> Editing
> support is still missing, but should not be too hard to add.
Repurposing this bug to be about editing then.
Comment 7 Gerrit Notification Bot 2013-05-24 13:55:26 UTC
Related URL: https://gerrit.wikimedia.org/r/65274 (Gerrit Change I827a37603e95b33f5e913097b9f8c0844d540110)
Comment 8 Gerrit Notification Bot 2013-05-25 08:43:15 UTC
https://gerrit.wikimedia.org/r/65274 (Gerrit Change I827a37603e95b33f5e913097b9f8c0844d540110) | change APPROVED and MERGED [by jenkins-bot]
Comment 9 Gabriel Wicke 2013-05-25 13:20:35 UTC
The above commit should have fixed this in the first iteration. There are still issues around HTML entity round-tripping, so I am repurposing this bug to be about that.
Comment 10 Gerrit Notification Bot 2013-05-29 21:01:45 UTC
Related URL: https://gerrit.wikimedia.org/r/66043 (Gerrit Change I45bbb5c01b00cffb07ac69e237aca63a32730f17)
Comment 11 Gerrit Notification Bot 2013-06-04 21:48:28 UTC
https://gerrit.wikimedia.org/r/66043 (Gerrit Change I45bbb5c01b00cffb07ac69e237aca63a32730f17) | change APPROVED and MERGED [by jenkins-bot]

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


Navigation
Links