billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=afe4b928bcc34fe43e0b51eb80b2cc1faf6dd3e1

commit afe4b928bcc34fe43e0b51eb80b2cc1faf6dd3e1
Author: Boris Faure <[email protected]>
Date:   Sun Dec 25 18:18:16 2016 +0100

    improve link detection when stored in xml
    
    example:
    <url>https://terminolo.gy/</url>
---
 src/bin/termiolink.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/bin/termiolink.c b/src/bin/termiolink.c
index c1f88f5..4394d85 100644
--- a/src/bin/termiolink.c
+++ b/src/bin/termiolink.c
@@ -361,6 +361,20 @@ termio_link_find(Evas_Object *obj, int cx, int cy,
              goforward = EINA_FALSE;
              break;
           }
+        switch (txt[0])
+          {
+           case '"':
+           case '\'':
+           case '`':
+           case '<':
+           case '>':
+           case '[':
+           case ']':
+           case '{':
+           case '}':
+           case '|':
+             goto out;
+          }
 
         res = ty_sb_add(&sb, txt, txtlen);
         if (res < 0) goto end;
@@ -381,6 +395,7 @@ termio_link_find(Evas_Object *obj, int cx, int cy,
         y2 = new_y2;
      }
 
+out:
    if (sb.len)
      {
         Eina_Bool is_file = _is_file(sb.buf);

-- 


Reply via email to