You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/11/16 17:47:03 UTC

[incubator-superset] branch master updated: Fix slug function (#3876)

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 <ma...@gmail.com>
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" <co...@superset.apache.org>'].