URL encode wiki link
This commit is contained in:
@@ -160,8 +160,9 @@
|
|||||||
query = query.replace(/_/g, " ");
|
query = query.replace(/_/g, " ");
|
||||||
var header = $("<em/>");
|
var header = $("<em/>");
|
||||||
|
|
||||||
if (match = query.match(/^wiki:(.+)/)) {
|
var match = query.match(/^wiki:(.+)/);
|
||||||
header.html($("<a/>").attr("href", "/wiki_pages?title=" + match[1]).attr("target", "_blank").text(query));
|
if (match) {
|
||||||
|
header.html($("<a/>").attr("href", "/wiki_pages?title=" + encodeURIComponent(match[1])).attr("target", "_blank").text(query));
|
||||||
} else {
|
} else {
|
||||||
header.text(query);
|
header.text(query);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user