Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link reference holds wrong URL #8021

Closed
heinrichmartin opened this issue Apr 22, 2021 · 7 comments
Closed

link reference holds wrong URL #8021

heinrichmartin opened this issue Apr 22, 2021 · 7 comments

Comments

@heinrichmartin
Copy link

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
Copy link
Member

alecpl commented Apr 24, 2021

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

@heinrichmartin
Copy link
Author

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 #8021

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

@alecpl
Copy link
Member

alecpl commented Apr 24, 2021

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.

@alecpl alecpl added this to the later milestone Apr 24, 2021
@heinrichmartin
Copy link
Author

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:

  • the author of the new text need not care about ids in quoted text
  • the renderer shall
    • look for references only in the same level of quotation or
    • ignore all references in quoted text

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

@alecpl alecpl modified the milestones: later, 1.5-rc Apr 25, 2021
@alecpl
Copy link
Member

alecpl commented Apr 25, 2021

Fixed.

@alecpl alecpl closed this as completed Apr 25, 2021
alecpl added a commit that referenced this issue Apr 25, 2021
…in plain text message (#8021)"

This reverts commit 2be7e1c.

The code used a PHP>=7.4 feature.
@alecpl
Copy link
Member

alecpl commented Apr 25, 2021

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

@alecpl alecpl reopened this Apr 25, 2021
alecpl added a commit that referenced this issue Apr 25, 2021
… text message (#8021)

Second attempt that should work on all supported PHP versions
@alecpl
Copy link
Member

alecpl commented Apr 25, 2021

Fixed.

@alecpl alecpl closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants