Skip to content

Conversation

@mistercrunch
Copy link
Member

Previous slug function would strip - characters.

fixes #3803

Copy link
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Django does this after normalizing to ascii:

    value = re.sub(r'[^\w\s-]', '', value).strip().lower()
    return re.sub(r'[-\s]+', '-', value)

@fabianmenges
Copy link
Contributor

What about international 'slugs'?

@mistercrunch
Copy link
Member Author

Yeah I researched this a bit and refrained from adding a dependency that does this.

@mistercrunch mistercrunch merged commit d9161fb into apache:master Nov 16, 2017
@mistercrunch mistercrunch deleted the fix_slug branch November 16, 2017 17:47
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0 First shipped in 0.21.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0 First shipped in 0.21.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dashboard][Slug] Spaces and hyphens are being ignored.

3 participants