From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 639CAE00C91; Thu, 10 Mar 2016 03:24:48 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.41 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 801B7E009C3 for ; Thu, 10 Mar 2016 03:24:45 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id l68so24176961wml.1 for ; Thu, 10 Mar 2016 03:24:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=IyhDB1fgoFMUs69PHj9ri/H0mlsbOJTCEVc66DMdsCU=; b=OeMfbjiXh00svLJy0C9qGv9SUUXWKEMDsq1W+aHh1ZM8rzL3rKbqzsi2RKVfWXGStQ VIwDXqCH3FzVRXxh4TaEeNsZXFE3byh5HSZ6DJiwDesgtC5BlUXVzRY9glrqQhE0u7GA BMCkTPFdV6zoZBtKe+qcA0R2Bu7M4zPeT8U+9xdysHW3k7lf0xkSDF0vJwY7GkwJ30El +YoFRu68E2cPGSDd1l4Ur0pZja77+ueeMEwrqESGUSezmh0Er63QYYslMsBnzVIWFVBX p816DNXV+twsJKMFwsBxV7ANVm8ZCph9JpWz69M9EceOPzlCqmvCMAEBIT9ye6sXKgRJ 62Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=IyhDB1fgoFMUs69PHj9ri/H0mlsbOJTCEVc66DMdsCU=; b=juNgfdqfikPhnH1e3+7MHxv7flXXZhaI9kWDsm95dYEZmNCp7Wh1ojWN+SqIhg3Pd2 RAB4dx+1Q/dD5XDmd4I4sYIPFIB7nijx4YxdjzOpl9sdK/cLn+RVcQEjLZrnWCGdWNSW i4RV72/6LrvdIsAPjPRVl372/uZEzVZ0VPTR6FxVyWgHTKZ2e8oGB3vdXjEC6DHJflMv +r8o3tiAe0kr453eeK8kxL38fphJMxPkGPTDEuNjkKRlUkf5QZlksBIl3IdwyGAKM1dv tRKIHnJlzrFftk9WCfruCksR2i7X9M37kYqalXupN7U1TgGfkQJKseZbq4wFjWc30pNE 3eCA== X-Gm-Message-State: AD7BkJL4xc5jBzfSo4XjyQn0x07/GLaMa/vsToiw+9hCA7QEXiDTBgY+fgm/21rGhc+vqxGp X-Received: by 10.194.191.199 with SMTP id ha7mr3209555wjc.128.1457609084609; Thu, 10 Mar 2016 03:24:44 -0800 (PST) Received: from [192.168.2.24] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id y3sm3025705wmy.17.2016.03.10.03.24.43 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 10 Mar 2016 03:24:43 -0800 (PST) To: toaster@yoctoproject.org References: <1457535135-5725-1-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <56E1597B.5030209@intel.com> Date: Thu, 10 Mar 2016 11:24:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1457535135-5725-1-git-send-email-elliot.smith@intel.com> Subject: Re: [PATCH] toaster: correctly handle quotes in project names X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 11:24:48 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit I think this is fixed here already so much be better to just wait for the build cancel stuff to be merged? http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/diff/bitbake/lib/toaster/toastergui/static/js/mrbsection.js?h=michaelw/sujith/build-cancel&id=1dfe119322cc7ab35e489bc83f9bcc49b087b0c4 Michael On 09/03/16 14:52, Elliot Smith wrote: > A project name like "Elliot's project" causes the "Rebuild" buttons > in the most recent builds section to fail when clicked with: > > Uncaught SyntaxError: Unexpected token ILLEGAL > > This is because the single quote character causes the JavaScript > for handling the button click event to be badly-formed. > > As the project name is passed to the scheduleBuild() function > but doesn't actually do anything, this can be fixed by removing > the project name from the arguments passed to scheduleBuild() > (as well as the project URL, which is also ignored). > > Signed-off-by: Elliot Smith > --- > bitbake/lib/toaster/toastergui/templates/mrb_section.html | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html > index 551e341..f43390f 100644 > --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html > +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html > @@ -109,10 +109,7 @@ > {%endif%} > pull-right" > onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}}, > - {{build.project.name|json}}, > - {% url 'project' build.project.id as purl %}{{purl|json}}, > {{build.target_set.all|get_tasks|json}})'> > - > Rebuild > > {% endif %} > @@ -134,7 +131,7 @@ > >