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

Allow special chars in user-defined date- and time-format strings #920

Conversation

carstingaxion
Copy link
Collaborator

@carstingaxion carstingaxion commented Sep 26, 2024

Fragmentation of #752


In the gatherpress timeformat settings, \ are ok and allowed.
grafik

While within the profile.php, they are not and get stripped off on save.
grafik

Description of the Change

This PR fixes that and allows to enter & save special chars into the custom datetime formatting settings.

Closes #

How to test the Change

Try to save the German timeformat and check it is actually saved: G:i \U\h\r,
which is the same as saying G:i o'clock

Changelog Entry

Fixed - Allow special chars in user-defined date- and time-format strings

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link

Preview changes with Playground

You can preview the recent changes for PR#920 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri mauteri merged commit 00db293 into GatherPress:main Sep 26, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants