Merge lp:~voldyman/pantheon-terminal/colon-fixed into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by Akshay Shekher
Status: Merged
Approved by: David Gomes
Approved revision: 507
Merged at revision: 508
Proposed branch: lp:~voldyman/pantheon-terminal/colon-fixed
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
src/TerminalWidget.vala (+1/-1)
To merge this branch: bzr merge lp:~voldyman/pantheon-terminal/colon-fixed
Reviewer Review Type Date Requested Status
David Gomes (community) Approve
Review via email: mp+180735@code.launchpad.net

Commit message

Fixed bug #1213018, URLs can now have colons in it.

Description of the change

fixed the colon in url bug

To post a comment you must log in.
507. By Akshay Shekher

url's with colon ':' also recognized

Revision history for this message
David Gomes (davidgomes) wrote :

This is going to get interesting.

david@davidbuntu:~$ https://pbs.twimg.com/media/BRRfNsxCYAAHdF6.jpg:large
bash: https://pbs.twimg.com/media/BRRfNsxCYAAHdF6.jpg:large: No such file or directory

On the second URL it also catches the second ":" now.

review: Needs Fixing
Revision history for this message
Akshay Shekher (voldyman) wrote :

it should catch the second colon because as far as the terminal is concerned : is a valid character in a url it can be present anywhere in the URL

Revision history for this message
David Gomes (davidgomes) wrote :

GNOME Terminal doesn't do it though.

Revision history for this message
Akshay Shekher (voldyman) wrote :

do we really want to do what gnome does or add new features?

Revision history for this message
David Gomes (davidgomes) wrote :

I'm pretty sure URLs can't end in a ":", so yes I want to do it like GNOME.

Revision history for this message
David Gomes (davidgomes) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/TerminalWidget.vala'
--- src/TerminalWidget.vala 2013-07-30 14:03:28 +0000
+++ src/TerminalWidget.vala 2013-08-18 18:12:21 +0000
@@ -41,7 +41,7 @@
41 const string HOSTCHARS_CLASS = "[-[:alnum:]]";41 const string HOSTCHARS_CLASS = "[-[:alnum:]]";
42 const string HOST = HOSTCHARS_CLASS + "+(\\." + HOSTCHARS_CLASS + "+)*";42 const string HOST = HOSTCHARS_CLASS + "+(\\." + HOSTCHARS_CLASS + "+)*";
43 const string PORT = "(?:\\:[[:digit:]]{1,5})?";43 const string PORT = "(?:\\:[[:digit:]]{1,5})?";
44 const string PATHCHARS_CLASS = "[-[:alnum:]\\Q_$.+!*,;@&=?/~#%\\E]";44 const string PATHCHARS_CLASS = "[-[:alnum:]\\Q_$.+!*,;:@&=?/~#%\\E]";
45 const string PATHTERM_CLASS = "[^\\Q]'.}>) \t\r\n,\"\\E]";45 const string PATHTERM_CLASS = "[^\\Q]'.}>) \t\r\n,\"\\E]";
46 const string SCHEME = """(?:news:|telnet:|nntp:|file:\/|https?:|ftps?:|sftp:|webcal:46 const string SCHEME = """(?:news:|telnet:|nntp:|file:\/|https?:|ftps?:|sftp:|webcal:
47 |irc:|sftp:|ldaps?:|nfs:|smb:|rsync:|ssh:|rlogin:|telnet:|git:47 |irc:|sftp:|ldaps?:|nfs:|smb:|rsync:|ssh:|rlogin:|telnet:|git:

Subscribers

People subscribed via source and target branches