godaddy-wordpress / godaddy-wordpress/coblocks
ISBAT compare 'slug-like' strings across languages in Form block
- Dominant language
- JavaScript
- Stars
- 794
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The From block has the ability to use Dynamic Subject lines by using shortcode replacements in the subject. The Form block currently does not process the shortcode into a 'slug-like' string yet it should both for programmatic comparison as well as visual placeholders. This fix will prevent undesirable aesthetics across international languages, namely those which use special characters.
**Visual display of shortcode placeholders should be slug-like across languages.**
https://github.com/godaddy-wordpress/coblocks/blob/0f75724b1f1a7f5d7772b2c53997601efb25b8a1/src/blocks/form/edit.js#L293-L305
**Programmatic comparison of shortcode slugs**
https://github.com/godaddy-wordpress/coblocks/blob/0f75724b1f1a7f5d7772b2c53997601efb25b8a1/includes/class-coblocks-form.php#L928-L958
**Possible technology to use: Lodash Kebab case**
https://lodash.com/docs/4.17.15#kebabCase
Contributor guide
Assessment
This issue has not been assessed yet.