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

Bug - remove page name normalization #353

Merged
merged 3 commits into from
Mar 15, 2021

Conversation

Sarah4x
Copy link

@Sarah4x Sarah4x commented Mar 12, 2021

This page name normalization is not correct. We should not assume that all pages with spaces in their name should be renamed. This causes issue between Core and Framework too where Framework has no normalization and when it tries to load the file/list item or verify the page is created, it queries for the page with spaces. The save method in Core always saves with replacing spaces with dashes.

This also causes issues with links to pages throughout a template that have linked to the page with spaces in its name.

I believe this normalization was implemented without understanding the implications. I feel that if SharePoint allows a user to rename a page to have spaces in the file name - then PnP should respect this and not rename the file.

@jansenbe I'm curious to know your take on this?

This page name normalization is not correct. We should not assume that all pages with spaces in their name should be renamed. This causes issue between Core and Framework where Framework has no normalization and when it tries to load the list item or verify the page is created, it queries for the page with spaces, but the save method in Core always saves with replacing spaces with dashes.

This also causes issues with links to pages throughout a template that have linked to a page with spaces in it's name.

I believe this normalization was implimented without understanding implications. I feel that if SharePoint allows a user to rename a page to have spaces in the title, then PnP should respect this and not rename the file.
@Sarah4x Sarah4x changed the title Bug remove page name normalization Bug - remove page name normalization Mar 12, 2021
@jansenbe
Copy link
Contributor

@Sarah4x : now that the work is done to handle special characters across PnP Core SDK doing this "normalization" indeed does not make much sense any more. I'll process this in the coming days. Thanks for sharing!

@jansenbe jansenbe self-assigned this Mar 12, 2021
@jansenbe jansenbe added the area: pages API 📄 Working with modern pages label Mar 12, 2021
jansenbe added a commit that referenced this pull request Mar 15, 2021
@jansenbe jansenbe merged commit 49d52ac into pnp:dev Mar 15, 2021
jansenbe added a commit that referenced this pull request Mar 15, 2021
jansenbe added a commit that referenced this pull request Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: pages API 📄 Working with modern pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants