Avoid removal of trailing chars if metadata looks like URL PAZ-915
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 7 Jan 2014 12:46:01 +0000 (13:46 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 7 Jan 2014 12:46:01 +0000 (13:46 +0100)
src/session.c

index d965d75..6d7ab65 100644 (file)
@@ -1459,8 +1459,11 @@ static struct record_metadata *record_metadata_init(
     {
     case Metadata_type_generic:
     case Metadata_type_skiparticle:
-        rec_md->data.text.disp =
-            normalize7bit_generic(nmem_strdup(nmem, value), " ,/.:([");
+        if (strstr(value, "://")) /* looks like a URL */
+            rec_md->data.text.disp = nmem_strdup(nmem, value);
+        else
+            rec_md->data.text.disp =
+                normalize7bit_generic(nmem_strdup(nmem, value), " ,/.:([");
         rec_md->data.text.sort = 0;
         rec_md->data.text.snippet = 0;
         break;