Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2
[pazpar2-moved-to-github.git] / src / session.c
index a3862c1..6d7ab65 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2013 Index Data
+   Copyright (C) Index Data
 
 Pazpar2 is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -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;