- Issue created by @VISIOS
- ๐จ๐ฟCzech Republic maxiorel Brno
Yes, having the same problems, if the text has any special characters like umlauts.
- ๐จ๐ญSwitzerland Mistrae
It happen with drupal 10.2, rolling back to 10.1 fixes the problem. So I think we need to open a ticket on the core issues.
- ๐จ๐ญSwitzerland Mistrae
Since this problem comes from an outside library now used in core, should we fix this here ? Removing htmlentities() seems to fix the issue.
- First commit to issue fork.
- Status changed to Needs review
9 months ago 9:09pm 26 February 2024 - ๐บ๐ธUnited States jayhuskins
The MR !7 will also fix this issue:
https://www.drupal.org/project/linked_field/issues/2979890 โMay require a new release version though, because unlike the previous functionality which searches for an image tag, this just wraps whatever the field would render in a link.
- ๐ซ๐ทFrance mably
We have the same problem here.
Just applied the patch above and everything seems to be back to normal.
Thanks. - ๐ง๐ชBelgium weseze
Changes in MR are already committed (but not released), see ๐ Linking breaks responsive image formats Fixed . (should really have this released)
Also, for us at least, this does not fix the issue. Special characters are still being stripped out.We tried reverting the change from core: ๐ [PP-upstream] Serialize function strips accents Postponed
That fixes the issue, but creates a whole new set of issues with contextual links being broken.
These seem to be converted into self-closing div tags, which is incorrect html and causes the contextual JS logic to incorrectly replace those.The only full solution we fount, is to use patch #8 from ๐ Linking breaks responsive image formats Fixed in combination with removing the "$text = htmlentities($text, ENT_QUOTES, 'UTF-8');" and "$value = Html::decodeEntities($value);". (see patch attached here)
- ๐ง๐ชBelgium weseze
Updated the patch. It sill gave us issues.
After further debugging noticed that the $text variable isn't actually a string, but a text object. It can be used straight up without any parsing to preserve all special characters. A usable patch has been generated for the current official version 1.5.
- ๐ต๐นPortugal jrochate
Same here. Version 1.6 has the problem with special chars. Patch in #15 for the 1.5 version works fine.
- ๐ฎ๐ณIndia hetal.solanki
Hetal.Solanki โ made their first commit to this issueโs fork.
- Assigned to hetal.solanki
- Issue was unassigned.
- ๐ฎ๐ณIndia hetal.solanki
@VISIOS
I have converted patch #15 into MR for easy use.
This is my commit : https://git.drupalcode.org/project/linked_field/-/merge_requests/9/diffs...Thank you!!
- ๐ซ๐ทFrance mably
@Hetal.Solanki it looks like you have overridden my own MR. Hopefully I had created a patch that we use in our composer.json...
- ๐ฎ๐ณIndia hetal.solanki
@mably
I have just converted patch #15 into an MR. Just because if in the future this MR merge, we don't need to use an extra patch.
- ๐ซ๐ทFrance mably
@Hetal.Solanki you should have updated MR 7 and not MR 9 which implemented a different type of fix.
Or even better, create a new MR.
- ๐ฎ๐ณIndia hetal.solanki
@mably
Okay, i am creating a new MR for patch #15.
- ๐ต๐นPortugal jrochate
This is getting a little messy.
The #12 works fine on module's 1.5 and 1.6 version.
- ๐บ๐ธUnited States DamienMcKenna NH, USA
I think #15 / MR 11 is the correct long-term approach; I was about to open another issue to rewrite the output to use a render array instead of converting it to a link tag, but it would be good for a maintainer to chime in on what approach they want.