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 and michellethomas committed May 23, 2018
1 parent d3dadc7 commit 3ba24d2
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 3ba24d2

Please sign in to comment.