Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize board name #98

Open
UVLabs opened this issue Apr 20, 2019 · 3 comments
Open

Sanitize board name #98

UVLabs opened this issue Apr 20, 2019 · 3 comments

Comments

@UVLabs
Copy link

UVLabs commented Apr 20, 2019

Currently we're manually removing special characters from board names to create the board id. Pinterest turns spaces into - and it strips out most special characters with the exception so far being ~ and +(which it turns + into %2B)

Would be cool if there was an inbuilt function in this wrapper to do that

@dirkgroenen
Copy link
Owner

I'm not sure if I get what you're asking for. Are you saying Pinterest returns an error when you provide a non-sanitized ID, or would it "just be nice" to have a sanitizer that behaves the same as Pinterest'?

@UVLabs
Copy link
Author

UVLabs commented Apr 6, 2020

@dirkgroenen sorry for the late reply here, and the answer to your question is Pinterest returns an error when you don't sanitize the ID.

If you have a board name "my board", check the address bar on Pinterest.com, Pinterest automatically adds the - and makes it "my-board"

So the actual board ID is "my-board", if you use the "board name" as is, then it would return an error because board name !== board id

@dirkgroenen
Copy link
Owner

I'm not sure if this library would be the right place for such a future. It sounds like you're trying to set a board's ID in advance the same way as Pinterest would do so. If that's true then why not just skip the ID and use the ID Pinterest returns?

If you don't agree I would love to see an example of some sorts which elaborates your feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants