roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.79k stars 1.62k forks source link

link reference holds wrong URL #8021

Closed heinrichmartin closed 3 years ago

heinrichmartin commented 3 years ago

My provider has Roundcube Webmail 1.4.11. Roundcube or one of the plugins renders references to links as link, i.e. in see [1] the number would become clickable with the URL that is given near the end of the email [1] https://example.com.

Given a plain-text email with such reference(s) was replied with more text and more references (i.e. the reply contains see my link [1]), then the href of this number holds the URL of the quoted email.

In the example below, both references [1] point to https://example.com. The best fix would find references per quoted email (level of quotation), but imho, it is acceptable to just get the actual email right and fully ignore the quoted one(s).

Content-Type: text/plain; charset=UTF-8; format=flowed

Testing the new link [1] [1] https://example.org

you wrote:

My link [1] [1] https://example.com

alecpl commented 3 years ago

I'm seeing kinda different issue. Could you provide precise steps to reproduce?

heinrichmartin commented 3 years ago

Could you provide precise steps to reproduce?

  1. Compose a plain text message to yourself:
Testing the new link [1]

[1] https://github.com/roundcube/roundcubemail/issues/8021

you wrote:
> My link [1]
>
> [1] https://example.com
  1. View the message in your inbox

Expected behavior: 1 in the first line renders as a link to https://github.com/roundcube/roundcubemail/issues/8021

Actual behavior: 1 in the first line renders as a link to https://example.com

alecpl commented 3 years ago

All right. That's one thing. Thanks. The other thing might be how to prevent that happening when such a content is being created, if it was created by Roundcube.

heinrichmartin commented 3 years ago

The other thing might be how to prevent that happening when such a content is being created, if it was created by Roundcube.

Honestly, I created this issue with my user experience in mind (without research how markdown renderers deal with this situation). I am fully aware that others might argue that re-using reference ids is illegal or that one might want to re-use a reference from the quoted text, but I prefer the other use case:

I do not see an issue in the editor (but I haven't played with it).

alecpl commented 3 years ago

Fixed.

alecpl commented 3 years ago

The fix didn't work on PHP < 7.4. Reverted. I'll look for a different solution.

alecpl commented 3 years ago

Fixed.