Page MenuHomePhabricator

Syntax error is caused by piped links in tabular response type of questions in Quiz extension
Closed, ResolvedPublic

Description

As reported on Wiki page of quiz extension using piped links inside tabular response questions results in syntax error.

To reproduce the bug use the following quiz:

{Question
|type="[]"}
| Option A | [[Article name|Option B]] | Option C 
++- Question 1 
(Clue: A and B are correct). 
-++ Question 2 ( 
Clue: B and C are correct). 
--+ Question 3 
(Clue: C is correct).

Interwiki links are abbreviations for commonly-used longer external links.External links work fine inside tabular response as they don't use " | " markup.

Event Timeline

(Removing GSoC / Outreach-Programs-Projects project tags as this is not a project proposal)

@Mvolz As the external link works fine inside tabular response questions, would it be considered a valid workaround to achieve the same?
The following code produces link inside categories.

{Question
|type="()"}
| A | [https://www.google.com B] | C 
+-- A is correct.
-+- [https://www.google.com B is correct].
--+ C is correct.

Screenshot -

links.png (368×1 px, 23 KB)

Harjotsingh changed the task status from Open to Stalled.Jun 17 2017, 2:29 PM

@Mvolz As the external link works fine inside tabular response questions, would it be considered a valid workaround to achieve the same?
The following code produces link inside categories.

{Question
|type="()"}
| A | [https://www.google.com B] | C 
+-- A is correct.
-+- [https://www.google.com B is correct].
--+ C is correct.

Screenshot -

links.png (368×1 px, 23 KB)

It's certainly a workaround, but I would consider this bug valid and should be fixed.

Mvolz changed the task status from Stalled to Open.Aug 14 2017, 10:31 AM

Change 371938 had a related patch set uploaded (by Harjotsingh; owner: Harjotsingh):
[mediawiki/extensions/Quiz@master] Use regex splitting for parseCategories to enable Interwiki links inside Categories

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

Change 371938 merged by jenkins-bot:
[mediawiki/extensions/Quiz@master] Use regex splitting for parseCategories to enable Interwiki and template links inside Categories

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

Mvolz removed a project: Patch-For-Review.
Mvolz removed a subscriber: gerritbot.