discourse/app
David Battersby 5d8632d484
FIX: fallback to composer for non ascii characters (#21465)
The problem
When selecting text and clicking the "Edit" button that pops up, this opens up the Fast Edit dialog.

The fast edit feature doesn't work well with non standard characters (non-ascii). If the user selects a string of text that contains non-ascii characters, sometimes they won't save. It is non-obvious to the user why this is happening. This issue occurs more frequently when editing content that is written in non-english languages, as fast-edit doesn't work well with non-ascii characters. We currently do a global replace on a couple of the more obvious quotation marks when the fast edit dialog attempts to save, but there are too many edge cases for foreign language content.

The solution
We can fix this issue by using a catch-all approach for non-ascii characters before the user clicks the edit button to bring up the fast edit dialog. Then we can fallback to the full composer to edit their text, which has much better support for non-ascii characters.

What does this regex do?
The regex used matches any character that is not within the ASCII range of 0x00 to 0x7F, which includes all control characters and non-ASCII characters.

This regex pattern can be used to match any character that is not a standard ASCII character, such as accented characters, non-Latin characters, and special symbols.
2023-05-10 12:38:28 +08:00
..
assets FIX: fallback to composer for non ascii characters (#21465) 2023-05-10 12:38:28 +08:00
controllers DEV: move sidebar community section to database (#21166) 2023-05-04 12:14:09 +10:00
helpers UX: Improve login required page (#20847) 2023-03-28 07:09:44 -05:00
jobs FEATURE: Add new notification for admin problems (#21287) 2023-05-03 19:35:22 +03:00
mailers FIX: Likes received count in digest email (#21458) 2023-05-09 19:19:26 +02:00
models FIX: Likes received count in digest email (#21458) 2023-05-09 19:19:26 +02:00
serializers DEV: move sidebar community section to database (#21166) 2023-05-04 12:14:09 +10:00
services FIX: do not allow title stuffing to dominate search (#21464) 2023-05-10 11:47:58 +10:00
views FIX: Likes received count in digest email (#21458) 2023-05-09 19:19:26 +02:00