Skip to content

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

Merged
mauteri merged 1 commit intoGatherPress:mainfrom
carstingaxion:fix/fragment-of-752-allow-user-datetime-formats-to-contain-special-chars
Sep 26, 2024
Merged

Allow special chars in user-defined date- and time-format strings#920
mauteri merged 1 commit intoGatherPress:mainfrom
carstingaxion:fix/fragment-of-752-allow-user-datetime-formats-to-contain-special-chars

Conversation

@carstingaxion
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
Contributor

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
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