Pasting string that starts with url is concatenated to one long link

I tested with 2.1.28 on Windows 10, see my debug info at [1].

If I have this in my text editor (notepad++):

https://changes.ankiweb.net/#/
Other changes:
    Performance improvements to a number of screens.

and copy and paste this into the Anki editor everything is concatenated/merged into one hyperlink:

https://changes.ankiweb.net/#/ Other changes: Performance improvements to a number of screens.

The source code is:

<a href="https://changes.ankiweb.net/#/
Other changes:
    Performance improvements to a number of screens.">https://changes.ankiweb.net/#/
Other changes:
    Performance improvements to a number of screens.</a>

This also happens in linux and with older Anki versions.

A minimal example that triggers this problem is

http://
1

The problem seems to disappear if the pasted text doesn’t start with the url. A leading space helps:

 http://
1

This also seems to work:

a
http://
1

In my latter two “working” examples the url is not transformed into a clickable hyperlink (anchor element) but is just regular text.


[1] my system:

Anki 2.1.28 (7d8818f8) Python 3.8.0 Qt 5.15.0 PyQt 5.15.0
Platform: Windows 10
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2020-07-20 18:05:24


===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])


===IDs of active AnkiWeb add-ons===


===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
2 Likes

Added to https://github.com/ankitects/help-wanted/issues/13

1 Like