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

links disappearing when signature conversion html to plain text (reopen #4473) #5795

Closed
chaos-prevails opened this issue Jun 10, 2017 · 6 comments

Comments

@chaos-prevails
Copy link

Hello,

I posted some days ago a comment on bug #4473 because I still experience the issue with roundcube 1.2.1. I tried it out with another identity and a minimal html signature and the same issue occurs.

steps to reproduce:

  1. create a new identity with a html signature, enter below code html into the source code window, click save
    ....
text before <a href="http://link1">
<img style="border: 0; width: 215px; height: 16px;" src="http://link1.logo-text.png" width="215" height="16">
</a> text after

....

  1. compose a new message, choose "plain text" as type
  2. the link will not show

expected outcome:
the link should be visible (and underlined) in the plain text-converted signature e.g.:
http://link1

Also, when I add text instead of the image within the a href tag, the link gets lost and only the text stays. I think it would be preferable to show the href attribute instead.

@alecpl
Copy link
Member

alecpl commented Jun 11, 2017

That's not exactly the same issue. The problem comes probably from the fact that you use an image inside of the link. So, when we remove the image the link becomes empty. I'm not sure maybe it could work if the <img> had an alt attribute. Anyway, it probably indeed makes sense to use link's href as the text in such cases.

@chaos-prevails
Copy link
Author

chaos-prevails commented Jun 11, 2017

hello,
thank you for your reply. no the alt attribute is not helping and I think it would also not be useful when the image is inside a a-href tag. When receiving an html email with images and the recipient has disabled to download remote content, I think the recipient should see a description of the image, not the link.

@alecpl alecpl added enhancement and removed bug labels Jun 13, 2017
@alecpl alecpl added this to the 1.4-beta milestone Jun 13, 2017
@alecpl
Copy link
Member

alecpl commented Jun 26, 2017

So, for both:

this is <a href="http://test.com">test</a>

and

this is <a href="http://test.com"><img src=http://other.com/image" alt="test" /></a>

output should be:

this is http://test.com

Right?

@alecpl alecpl self-assigned this Jun 26, 2017
@alecpl
Copy link
Member

alecpl commented Jun 29, 2017

Actually I decided that it makes sense only for cases when the link text is empty like with the image above. Fixed.

@alecpl alecpl closed this as completed Jun 29, 2017
@chaos-prevails
Copy link
Author

thank you! Wouldn't it be in both of your described cases be useful (also for a tags with text inside)?

@alecpl
Copy link
Member

alecpl commented Jun 29, 2017

I think it would depend on the context. Imho, current solution is more likely to match expectation of most of the users. And you can always use HTML if something's wrong with the conversion.

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