You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a new component is easy. The plugin will take care of the corresponding slug by sanitizing the name, as WordPress is doing for new posts.
Problem is when the user edit a component, they are able to update the slug and then include all sorts of characters, even with accents or special ones. No sanitization will ever occur and this will lead to a broken component.
Maybe the solution is to force slug even when updating a component (user don't have the choice), or force the slug once forever at the creation (it's internal only, so why not?), or simply sanitize again at slug update.
The text was updated successfully, but these errors were encountered:
blupu
changed the title
Component slog update
Component slug update
Jun 23, 2014
blupu
changed the title
Component slug update
Component Slug Update
Jun 23, 2014
I automatized ( with sanitize_title_with_dashes(remove_accents($component_label) ) the slug creation from the component label to keep it simple for the user, but as slugs can be used on the app side (functions.js in app themes) to make some conditionnal tests on which component is displayed, I think it's important that the user can still change it if needed.
I think I just forgot to apply :
sanitize_title_with_dashes(remove_accents(trim($data['component_slug'])))
to the slug when updating a component!
Adding a new component is easy. The plugin will take care of the corresponding slug by sanitizing the name, as WordPress is doing for new posts.
Problem is when the user edit a component, they are able to update the slug and then include all sorts of characters, even with accents or special ones. No sanitization will ever occur and this will lead to a broken component.
Maybe the solution is to force slug even when updating a component (user don't have the choice), or force the slug once forever at the creation (it's internal only, so why not?), or simply sanitize again at slug update.
The text was updated successfully, but these errors were encountered: