Anki Forums

Pasted links are always clickable?

A user reported an issue on Reddit that I was able to reproduce in Anki 2.1.34.

When pasting links into a field, Anki is always creating a clickable link. It doesn’t matter whether you hold shift or not, or whether the option to strip formatting is checked in the preferences.

This messed up their template, because they had something like this going on:

<a href="{{Reference}}">For Reference</a>

So, they ended up with this:

<a href="<a href="https://apps.ankiweb.net/">https://apps.ankiweb.net/</a>">For Reference</a>

Which displays this, when reviewing:

https://apps.ankiweb.net/">For reference.

Is this the default behavior or a bug?

It might help to use {{text:Reference}} instead of {{Reference}} to strip HTML tags.

https://docs.ankiweb.net/#/templates/fields?id=html-stripping

4 Likes

That worked! I will let them know. Thanks.

1 Like