8166176: module search generates URLs with extra '/'

Reviewed-by: jjg
This commit is contained in:
Bhavesh Patel 2016-09-16 12:17:44 -07:00
parent eb56700eba
commit f4abd474cc

View File

@ -263,18 +263,18 @@ $(function() {
if (ui.item.l !== noResult.l) {
var url = "";
if (ui.item.category === catModules) {
url = "/" + ui.item.l + "-summary.html";
url = ui.item.l + "-summary.html";
} else if (ui.item.category === catPackages) {
url = ui.item.l.replace(/\./g, '/') + "/package-summary.html";
} else if (ui.item.category === catTypes) {
if (ui.item.p === "<Unnamed>") {
url = "/" + ui.item.l + ".html";
url = ui.item.l + ".html";
} else {
url = ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html";
}
} else if (ui.item.category === catMembers) {
if (ui.item.p === "<Unnamed>") {
url = "/" + ui.item.c + ".html" + "#";
url = ui.item.c + ".html" + "#";
} else {
url = ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#";
}