Link with special characters break in 3.9

Link with special characters break in 3.9

by Peter Haasdijk -
Number of replies: 4

When I include a link in a book or label in 3.9 something goes wrong. For example, Moodle converts this url: "https://www.labby.nl/aanbod/7surprisenboarding-game" to "https://www.labby.nl/aanbod/7<img class =".

In 3.8 the url is fine. Is there anyone who knows what's going wrong here?

Thanks,
Peter

Average of ratings: -
In reply to Peter Haasdijk

Re: Link with special characters break in 3.9

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It's the Display Emoticons as Images filter. With 3.8 and earlier this was switched off by default. With new sites from 3.9 it's switched on (MDL-68563).

This filter is converting the sequence8, -, o uploaded as an image because filter_emoticon will change it to a surprised face.into a "surprised" face (as you can see in your post Moodle.org does this too).

You can turn this off to prevent the problem, either:

  1. turn the filter off from Site administration → Plugins → Filters → Manage filters and change the Active? setting for Display emoticons as images to either Disabled or Off, but available, or,
  2. go to Site administration → Plugins → Filters → Display emoticons as images and uncheck HTML format.

Presumably this is a bug, surely the filter shouldn't be applied to text inside HTML elements such as links.

Average of ratings: Useful (2)
In reply to Leon Stringer

Re: Link with special characters break in 3.9

by Peter Haasdijk -

Learned something again today. I didn't get the hint ('surprise' in the tooltip).

Thank you so much,

Peter

In reply to Peter Haasdijk

Re: Link with special characters break in 3.9

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It looks like there's an additional workaround for this: you can enclose the sequence you don't want converting in <span class="nolink">…</span> (MDL-42638). It's maybe for advanced users but it might help someone.

Assuming the default Atto editor is in use you do this by:

Clicking Show/hide advanced buttons in the toolbar (top-left)

Click the </> HTML button in the toolbar (bottom-right)

Then add the <span> element, e.g. for the above link:

<span class="nolink"><a href="https://www.labby.nl/aanbod/78-onboarding-game">Onboarding Game</a></span>

I will now test if this works on the forums too, this text should have no images: https://www.labby.nl/aanbod/78-onboarding-game

Average of ratings: Useful (1)