Ticket #156: guake-regexp-fix.patch

File guake-regexp-fix.patch, 1.3 KB (added by plaes, 3 years ago)
  • src/guake_globals.py.in

    From 9c1b9ffee41e9c9ec9cb0e38c25e5c3cf726041c Mon Sep 17 00:00:00 2001
    From: Priit Laes <plaes@plaes.org>
    Date: Sat, 13 Jun 2009 20:30:33 +0300
    Subject: [PATCH] Update regexp to use character classes instead of a-z.
    
    a-z is not working as expected for locales like Estonian (et_EE).
    
    Signed-off-by: Priit Laes <plaes@plaes.org>
    ---
     src/guake_globals.py.in |   10 +++++-----
     1 files changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/src/guake_globals.py.in b/src/guake_globals.py.in
    index d581c53..06e366c 100644
    a b  
    3636 
    3737# regular expressions to highlight links in terminal. This code was 
    3838# lovely stolen from the great gnome-terminal project, thank you =) 
    39 USERCHARS = "-A-Za-z0-9" 
    40 PASSCHARS = "-A-Za-z0-9,?;.:/!%$^*&~\"#'" 
    41 HOSTCHARS = "-A-Za-z0-9" 
     39USERCHARS = "-[:alnum:]" 
     40PASSCHARS = "-[:alnum:],?;.:/!%$^*&~\"#'" 
     41HOSTCHARS = "-[:alnum:]" 
    4242HOST      = "[" + HOSTCHARS + "]+(\\.[" + HOSTCHARS + "]+)*" 
    43 PORT      = "(:[0-9]{1,5})?" 
    44 PATHCHARS =  "-A-Za-z0-9_$.+!*(),;:@&=?/~#%" 
     43PORT      = "(:[:digit:]{1,5})?" 
     44PATHCHARS =  "-[:alnum:]_$.+!*(),;:@&=?/~#%" 
    4545SCHEME    = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)" 
    4646USER      = "[" + USERCHARS + "]+(:[" + PASSCHARS + "]+)?" 
    4747URLPATH   = "/[" + PATHCHARS + "]*[^]'.}>) \t\r\n,\\\"]"