8166176: module search generates URLs with extra '/'
authorbpatel
Fri, 16 Sep 2016 12:17:44 -0700
changeset 41032 32be25e34c38
parent 41031 9075bf88387b
child 41033 49af2ecba616
8166176: module search generates URLs with extra '/' Reviewed-by: jjg
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Fri Sep 16 11:58:23 2016 -0600
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Fri Sep 16 12:17:44 2016 -0700
@@ -263,18 +263,18 @@
             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" + "#";
                     }