From 1105cfc3a8094cd567a845fa8644d13ab6dba4e0 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 17 Oct 2012 08:35:57 -0700 Subject: [PATCH] Don't set mustcapture for falsey values Summary: See discussion in D3722. Good catch -- I'd definitely say this is a bug. Test Plan: Rendered two
s, one with mustcapture set to `true` and one to `false`. The first got `data-mustcapture`; the second did not. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D3723 --- src/infrastructure/javelin/markup.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/javelin/markup.php b/src/infrastructure/javelin/markup.php index 1836eeb6ff..98c0a6a071 100644 --- a/src/infrastructure/javelin/markup.php +++ b/src/infrastructure/javelin/markup.php @@ -37,7 +37,11 @@ function javelin_render_tag( unset($attributes[$k]); break; case 'mustcapture': - $attributes['data-mustcapture'] = '1'; + if ($v) { + $attributes['data-mustcapture'] = '1'; + } else { + unset($attributes['data-mustcapture']); + } unset($attributes[$k]); break; }