Page MenuHomePhabricator

Maplink extractMarkerCss does not extract the color hex code correctly
Closed, ResolvedPublic

Description

How to quickly reproduce the bug:

<?php
preg_match( '/^#?(([0-9a-fA-F]{3}){1,2})$/', '#abcdef', $m );
var_dump($m);

outputs:

array(3) { [0]=> string(4) "#abc" [1]=> string(3) "abc" [2]=> string(3) "abc" }

And since the method currently returns return "background: #{$m[2]};";, the extracted color is: #abc instead of #abcdef.

Event Timeline

JGirault created this task.Jun 2 2016, 9:39 PM

Change 292499 had a related patch set uploaded (by MaxSem):
Fix color extraction

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

Change 292499 merged by jenkins-bot:
Fix color extraction

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

Yurik closed this task as Resolved.Jun 2 2016, 11:15 PM

Change 293251 had a related patch set uploaded (by Yurik):
Fix color extraction

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

Change 293251 merged by jenkins-bot:
Fix color extraction

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