Adium

Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#4695 closed defect (fixed)

In Jabber, plain-text representation of hyperlinks should include URL

Reported by: mietek@gmail.com Owned by: am
Milestone: Component: Service/XMPP (Jabber)
Version: Severity: normal
Keywords: paste hyperlink link Cc:
Patch Status:

Description

When I copy a hyperlink from Safari (for example, using the Copy Image Address command from the contextual menu) and paste it into Adium, it appears as a blue, underlined, hyperlinked filename -- if the link was "http://desp.night.pl/tmp/wtf.gif", it appears as "wtf.gif". The complete hyperlink does not always reach the recipient.

Specifically, in the case of the Jabber protocol, the Jabber message sent looks like this (with recipients redacted):

<message type='chat' id='gaimc4192711' to='user@host/Psi'>
	<x xmlns='jabber:x:event'><composing/></x>
	<body>wtf.gif</body>
	<html xmlns='http://jabber.org/protocol/xhtml-im'>
		<body xmlns='http://www.w3.org/1999/xhtml'>
			<span style='font-family: Lucida Grande; font-size: small;'><a href='http://desp.night.pl/tmp/wtf.gif' title='http://desp.night.pl/tmp/wtf.gif'>wtf.gif</a></span>
		</body>
	</html>
</message>
<message type='chat' id='gaimc41926d6' to='user@host/Gajim'>
	<active xmlns='http://jabber.org/protocol/chatstates'/>
	<body>wtf.gif</body>
	<html xmlns='http://jabber.org/protocol/xhtml-im'>
		<body xmlns='http://www.w3.org/1999/xhtml'>
		<span style='font-family: Lucida Grande; font-size: small;'><a href='http://desp.night.pl/tmp/wtf.gif' title='http://desp.night.pl/tmp/wtf.gif'>wtf.gif</a></span>
		</body>
	</html>
</message>

It appears that the complete hyperlink is sent using the XHTML-IM protocol, which doesn't seem to be supported by either Psi 0.10 or Gajim 0.10.1 (the latest versions). However, there is no reason not to send the complete hyperlink also in the preceding non-XHTML body element.

Change History (13)

comment:1 Changed 14 years ago by Peter Hosey

Keywords: paste, hyperlink, linkpaste hyperlink link
Summary: Pasted hyperlinks lose protocol, domain and path; get sent as filenamesPlain-text representation of pasted hyperlinks should include URL

This summary describes the actual problem. The original summary is untrue, since pasted hyperlinks are not stripped until they are converted to plain-text.

Also, keywords are space-separated.

comment:2 Changed 14 years ago by mietek@…

The same thing happens over the Gadu-Gadu protocol. The GG protocol isn't human-readable, but an equivalent message to those quoted above, captured using a TCP flow analyzer, contains only the filename portion of the URL, as plain text.

comment:3 Changed 14 years ago by cheesy

In a similar vein, if I right click on an image that is a link in Safari and select "Copy link as", the resultant paste into adium is simply a space

comment:4 Changed 13 years ago by Eric Richie

Milestone: Sometime after 1.0

comment:5 Changed 13 years ago by Evan Schoenberg

Summary: Plain-text representation of pasted hyperlinks should include URLIn Jabber, plain-text representation of hyperlinks should include URL

Please file a bug report with the Gaim team <a href="http://gaim.sourceforge.net/bug.php">here</a>, as this is a fairly fundamental decision about how libgaim handles sending messages wit xhtml. Adium sends the full HTML to libgaim.

comment:6 Changed 13 years ago by Evan Schoenberg

Milestone: Sometime after 1.0Waiting on libgaim

comment:7 in reply to:  6 Changed 13 years ago by chagrins

Is this the same as the following phenomenon I've experienced with Google Talk: Dragging a URL from Safari's address bar (or clicking the "Insert Link to Active Page in Safari" toolbar button) to Adium properly produces a link, with the page's title as "link text." However, that appears only on my end - the recipient (as well as the "Chats" archive in Gmail) sees only the link text, with no clickable link (and no URL).

Is this the same as the above, or should a separate ticket be filed? It might be clever for Adium to automatically insert either a plain URL or the title as linked text, depending on if the protocol supported it.

comment:8 Changed 13 years ago by Eric Richie

Milestone: Waiting on libgaimWaiting on libpurple

comment:9 Changed 13 years ago by Andreas Monitzer

Owner: changed from nobody to Andreas Monitzer
Patch Status: None

comment:10 Changed 13 years ago by Andreas Monitzer

Milestone: Waiting on libpurpleSummer of Code 07
Status: newassigned

comment:11 Changed 13 years ago by Andreas Monitzer

pending: 0

This should be fixed in libpurple in util.c:purple_markup_html_to_xhtml and purple_markup_strip_html, but since these functions are very long, I'm not sure if I can do that without breaking everything.

comment:12 Changed 13 years ago by Andreas Monitzer

Resolution: fixed
Status: assignedclosed

(In [20136]) When sending formatted messages, links in the plain text alternative now use 'text' <'url'> instead of just 'text'. Fixes #4695

comment:13 Changed 12 years ago by (none)

Milestone: Summer of Code 07

Milestone Summer of Code 07 deleted

Note: See TracTickets for help on using tickets.