Page MenuHomePhabricator

[Migrated] Fix unbalanced brackets inside gallery
Open, LowPublic

Description

<gallery>[[File:foo.jpg</gallery> → <gallery>File:foo.jpg</gallery> [[https://en.wikipedia.org/w/index.php?title=Geography_of_Saint_Kitts_and_Nevis&diff=520233843&oldid=520088437 Example]] @Magioladitis 08:09, 28 October 2012 (UTC)

Event Timeline

Reguyla raised the priority of this task from to Needs Triage.
Reguyla updated the task description. (Show Details)
Reguyla added a project: AutoWikiBrowser.
Reguyla moved this task to General fixes on the AutoWikiBrowser board.

@TMg 12:43, 11 May 2014 (UTC) wrote:

I just added these two regex to my tool. They are applied only to the contents of gallery tags.

  1. Replace: '^(\\s*)\\[+([^[\\]]*)\\]\\]?\s*$' (RegexOptions.Multiline) with '$1$2'
  2. Replace: '^(\\s*)\\[+' (RegexOptions.Multiline) with '$1'

This is my test case:

 <gallery>[[File:1.jpg|1]]
 [[File:2.jpg|2
[[File:3.jpg|[[Valid]]</gallery>

Expected result:

 <gallery>File:1.jpg|1
 File:2.jpg|2
File:3.jpg|[[Valid]]</gallery>
StjnVMF renamed this task from [Migrated] Fix unbalanced brackets inside gallery to unban reguyla.May 18 2018, 5:20 PM
StjnVMF set Security to Software security bug.
StjnVMF added a project: acl*security.
StjnVMF changed the visibility from "Public (No Login Required)" to "Custom Policy".
StjnVMF updated the task description. (Show Details)
StjnVMF subscribed.
Dzahn renamed this task from unban reguyla to [Migrated] Fix unbalanced brackets inside gallery.May 18 2018, 5:34 PM
Dzahn updated the task description. (Show Details)
Bawolff changed the visibility from "Custom Policy" to "Public (No Login Required)".
Aklapper triaged this task as Low priority.Feb 10 2023, 12:06 PM