- Issue created by @hadsie
- Status changed to Needs review
over 1 year ago 7:48am 10 July 2023 - 🇸🇰Slovakia poker10
There is a D7 patch, so moving to Needs Review to see if tests are green.
- last update
over 1 year ago 2,155 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,120 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,120 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - Status changed to RTBC
over 1 year ago 4:32pm 11 August 2023 - 🇸🇰Slovakia poker10
Thanks for working on this!
I have reviewed this patch and it seems like a straight backport of the D9 issue (https://git.drupalcode.org/project/drupal/-/commit/f7ccf32f21b76e4b8c9c8...). The code is the same and the changes in tests are present as well. Moving to RTBC and adding a tag for final review/commit.
- last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago 2,159 pass - last update
over 1 year ago run-tests.sh exception - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,160 pass - last update
over 1 year ago 2,161 pass - last update
over 1 year ago run-tests.sh exception - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago run-tests.sh exception - last update
about 1 year ago run-tests.sh exception - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass 17:58 14:20 Running- last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - last update
about 1 year ago 2,161 pass - 🇬🇧United Kingdom rakesh.gectcr Manchester
mcdruid → credited rakesh.gectcr → .
- Status changed to Fixed
about 1 year ago 11:50am 10 November 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
12 months ago 4:41am 5 January 2024 - 🇹🇼Taiwan Hipfox
After applying the patch, the correctness of CJK characters was affected. For example,
"中文abc@example.com中文"
both drupal 7.99 and 10.1.3 was converted to an entire link.
Old content with email addresses like above may be entire paragraph converted into strange characters, for example:
"以電子郵件寄èï¼ä¿¡ä»¶æ¨é¡ãæå¾µå ¨è·äººå¡ï¼æ¨çå§åï¼ãã ..." this only happens at drupal 7.99.
- 🇹🇼Taiwan charlesc
After applying the patch, the correctness of CJK characters was affected.
I'm having the same problem and need help.
- 🇸🇰Slovakia poker10
Thanks for reporting this. Can you please provide more information and steps to reproduce?
I launched Drupal 7.98 on simpletest.me and with filtered HTML format tried to save "中文abc@example.com中文". Only the "abc@example.com" part was converted to email address. Then I tried the same on Drupal 7.99 and the result was the same. Text format configuration is default (clean installation).
It would be great if you can provide information which text format are you using, what is the configuration of that text format and what is the real vs expected output on each Drupal 7.98 and 7.99. Thanks!
- 🇹🇼Taiwan charlesc
Hi poker10,
Thanks for your testing and information. I would do more testing to find out the cause (configuration or environment).
- 🇹🇼Taiwan charlesc
Hi poker10,
It turned out that errors occurred with certain Chinese characters: "來信至abc@example.com"
Test with https://simplytest.me/ (Drupal 7.99 + PHP 7.4.28):As shown below(left), it is completely blank and cannot be displayed.
→If you add a half-shaped space, the content can be displayed correctly.
→ - 🇸🇰Slovakia poker10
Thanks for providing additional information. I debugged this based on your example and it seems like the problem is that D7 does not have "u" modifier on the pattern.
There is an issue which added this to D8+, but this issue was not backported to D7 yet, see: 🐛 Filter "Convert URLs into links" doesn't support multilingual web addresses Needs work
So currently the D10 has this (see the second row):
$url_pattern = "[\p{L}\p{M}\p{N}._+-]{1,254}@(?:$email_domain)"; $pattern = "`($url_pattern)`u";
And D7 this:
$url_pattern = "[\p{L}\p{M}\p{N}._+-]{1,254}@(?:$email_domain)"; $pattern = "`($url_pattern)`";
When I added this "u" modifier manually to test it, the email address started to display correctly again.
The question is, whether we can finish and backport the 🐛 Filter "Convert URLs into links" doesn't support multilingual web addresses Needs work into D7 (so we would have a full fix available), or if it would be easier to just add these modifiers without any side effects, if the rest of the fix from the mentioned issue will be not backported. Currently I do not have a full knowledge what impact could have adding that modifier, so need to discuss this further.
- Status changed to Needs review
11 months ago 3:17pm 26 January 2024 - last update
11 months ago 2,169 pass - 🇬🇧United Kingdom mcdruid 🇬🇧🇪🇺
Depending on how we proceed, we might want a new followup issue.
Therefore I've not created an MR, but here's a quick patch with one suggestion for how we could handle this issue.
Rather than making a(nother) potentially impactful change within D7's core filtering, we could add a
drupal_alter()
which would allow contrib/custom modules to make changes required for e.g. better unicode support.This patch includes a test based on the examples provided in the previous few comments.
- 🇬🇧United Kingdom mcdruid 🇬🇧🇪🇺
Oops - there's a bit of copypasta and other mess left over in the patch; I'll tidy it up if we decide to proceed in this direction.
- last update
11 months ago run-tests.sh exception - last update
11 months ago 2,169 pass - last update
11 months ago 2,168 pass, 1 fail The last submitted patch, 33: 3372666-33_test_only.patch, failed testing. View results →
- 🇸🇰Slovakia poker10
Thanks for the idea @mcdruid! I like this idea to add a new hook, instead of trying to push all complex changes from 🐛 Filter "Convert URLs into links" doesn't support multilingual web addresses Needs work without proper review / testing (in this D7 phase).
Should we create follow-up issue for this hook implementation?
@charlesc If you would have a minute, can you please confirm, if such an approach will work for you? Thanks!
- 🇬🇧United Kingdom mcdruid 🇬🇧🇪🇺
Yeah a follow-up would be a good idea if we're going to add the hook.