w2v-server: fix KorAP search for multiple word alternatives
diff --git a/templates/index.html.ep b/templates/index.html.ep
index f50078c..a29ced3 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -15,7 +15,8 @@
         crossorigin="anonymous"></script>
     <script>
      var urlParams = new URLSearchParams(window.location.search);
-     var currentWord = urlParams.get("word");
+     var currentWords = urlParams.get("word");
+     var CIIsearchWords = (currentWords.includes(" ") ? '('+currentWords.replace(/ +/g, " oder ")+')' : currentWords);
 
      $('#firstable').hide();
      $(document).ready(function() {
@@ -45,7 +46,7 @@
              var newText = "";
              for (var i=0, l=txt.length; i<l; i++) {
                  newText += (i == 5 ? txt.charAt(i) : '<a href="http://korap.ids-mannheim.de/kalamar/?ql=cosmas2&q=' +
-                                                      currentWord + ' /' +  (i > 5? '%2B' : '-') + 'w' +
+                                                      CIIsearchWords + ' /' +  (i > 5? '%2B' : '-') + 'w' +
                                                       Math.abs(i-5) + ':' +  Math.abs(i-5) + ' ' + word +
                                                       '" target="korap"><span style="background-color:' +
                                                       getHeatColor(heat[i]/maxHeat)+'">'+txt.charAt(i)+'</span></a>');
@@ -194,7 +195,7 @@
 
      $(function(){
          $("td.collocator").click(function(){
-             queryKorAPCII(this.textContent + " /w5 " + urlParams.get('word'));
+             queryKorAPCII(this.textContent + " /w5 " + CIIsearchWords);
          });
      });