Skip to content

Commit

Permalink
Fix slug function (apache#3876)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Nov 16, 2017
1 parent cd0539a commit 123a60d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def pre_add(self, obj):
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)
Expand Down

0 comments on commit 123a60d

Please sign in to comment.