Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 21FF5200D3E for ; Thu, 16 Nov 2017 18:47:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 207591609EF; Thu, 16 Nov 2017 17:47:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 67A44160BEA for ; Thu, 16 Nov 2017 18:47:05 +0100 (CET) Received: (qmail 92069 invoked by uid 500); 16 Nov 2017 17:47:04 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 92039 invoked by uid 99); 16 Nov 2017 17:47:04 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 17:47:04 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id C673F81C32; Thu, 16 Nov 2017 17:47:03 +0000 (UTC) Date: Thu, 16 Nov 2017 17:47:03 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: Fix slug function (#3876) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151085442365.387.1732208136987315649@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 85b18ff5e7eb372b19f2b1174e08a41cc8d317b0 X-Git-Newrev: d9161fb76a9481fb8cf88812be1b9b8f97a028f3 X-Git-Rev: d9161fb76a9481fb8cf88812be1b9b8f97a028f3 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Thu, 16 Nov 2017 17:47:06 -0000 This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/master by this push: new d9161fb Fix slug function (#3876) d9161fb is described below commit d9161fb76a9481fb8cf88812be1b9b8f97a028f3 Author: Maxime Beauchemin AuthorDate: Thu Nov 16 09:47:00 2017 -0800 Fix slug function (#3876) --- superset/views/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/views/core.py b/superset/views/core.py index bebf17f..17f5151 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -515,7 +515,7 @@ class DashboardModelView(SupersetModelView, DeleteMixin): # noqa obj.slug = obj.slug.strip() or None if obj.slug: obj.slug = obj.slug.replace(' ', '-') - obj.slug = re.sub(r'\W+', '', obj.slug) + obj.slug = re.sub(r'[^a-zA-Z0-9\-]+', '', obj.slug) if g.user not in obj.owners: obj.owners.append(g.user) utils.validate_json(obj.json_metadata) -- To stop receiving notification emails like this one, please contact ['"commits@superset.apache.org" '].