Patrick Brosi 4 년 전
부모
커밋
5e1512095f
3개의 변경된 파일14개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 0
      src/osmfixer/server/StatServer.cpp
  2. 10 4
      web/index.html
  3. 3 3
      web/script.js

+ 1 - 0
src/osmfixer/server/StatServer.cpp

@@ -444,6 +444,7 @@ util::http::Answer StatServer::handleSearch(const Params& pars) const {
444 444
   if (pars.count("cb")) cb = pars.find("cb")->second.c_str();
445 445
 
446 446
   std::string query = pars.find("q")->second.c_str();
447
+  if (query.size() > 100) query.resize(100);
447 448
 
448 449
   auto results = _searchIdx.find(query);
449 450
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 10 - 4
web/index.html


+ 3 - 3
web/script.js

@@ -441,7 +441,7 @@ var map = L.map('m', {renderer: L.canvas(), attributionControl: false}).setView(
441 441
 
442 442
 map.addControl(L.control.attribution({
443 443
     position: 'bottomright',
444
-    prefix: '&copy; <a href="https://ad.cs.uni-freiburg.de">University of Freiburg, Chair of Algorithms and Data Structures</a>'
444
+    prefix: '&copy; <a target="_blank" href="https://ad.cs.uni-freiburg.de">University of Freiburg, Chair of Algorithms and Data Structures</a>'
445 445
 }));
446 446
 
447 447
 map.on('popupopen', function(e) {
@@ -456,7 +456,7 @@ map.on('popupopen', function(e) {
456 456
 
457 457
 L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png', {
458 458
     maxZoom: 20,
459
-    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
459
+    attribution: '&copy; <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
460 460
     opacity: 0.8
461 461
 }).addTo(map);
462 462
 
@@ -612,7 +612,7 @@ function s(q) {
612 612
     }
613 613
 
614 614
     delayTimer = setTimeout(function() {
615
-        req("sr", "/search?q=" + q, function(c) {
615
+        req("sr", "/search?q=" + encodeURIComponent(q.substring(0, 100)), function(c) {
616 616
                 var res = $("#sres");
617 617
                 addCl(res, "res-open");
618 618
                 res.innerHTML = "";