@Slowhand can I just double check, how much of the [url tag are you highlighting before pasting? If I’m understanding it correctly, I think think @gwwar’s PR only covers option 1 below. Will that fix the issue for you?
Option 1:
This is a sentence with [url=discourse.org]A link[/url]
Option 2:
This is a sentence with [url=discourse.org]A link[/url]
Option 3:
This is a sentence with [url=discourse.org]A link[/url]