mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 19:32:59 +08:00
249f4296bf
The problem 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, then the edit won't save. The solution The best solution is to catch those 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 to catch this is [^\x00-\x7F], which 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. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |