diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js
index e450af9..8aab466 100644
--- a/htdocs/mapscript.js
+++ b/htdocs/mapscript.js
@@ -256,7 +256,7 @@ function polyline_get_middle_coords(coords) {
var highlighted_line;
var default_street_color = "#3388ff";
function search(e) {
- var query = htmlEntities(document.getElementById("search_query").value);
+ var query = document.getElementById("search_query").value;
document.getElementById('search_results').innerHTML = "";
if (query.length > 0 || e.key == "Enter") {
results = document.createElement("ul");
@@ -271,7 +271,7 @@ function search(e) {
regex = new RegExp(query, 'i');
if (item.feature.properties.name.match(regex)) {
el = document.createElement("li");
- el.innerHTML = "[" + layers._layers[i].name + "] " + '' + item.feature.properties.name + "";
+ el.innerHTML = "[" + layers._layers[i].name + "] " + '' + htmlEntities(item.feature.properties.name) + "";
results.appendChild(el);
}
break;
@@ -283,12 +283,11 @@ function search(e) {
regex = new RegExp(query, 'i');
if (item.feature.properties.name.match(regex)) {
- console.log(item.options.color);
item.options.color = "#FF0000";
item.redraw();
el = document.createElement("li");
zpos = polyline_get_middle_coords(item.feature.geometry.coordinates);
- el.innerHTML = "[" + layers._layers[i].name + "] " + '' + item.feature.properties.name + "";
+ el.innerHTML = "[" + layers._layers[i].name + "] " + '' + htmlEntities(item.feature.properties.name) + "";
results.appendChild(el);
}
break;