diff --git a/web/lib/topnav_html.ssjs b/web/lib/topnav_html.ssjs
index eb01f1e167d9eb5d9785a09d2162f46e2768216e..11ba8cb9a0a5ea8cb3a40f2ce8770444aa1226c0 100644
--- a/web/lib/topnav_html.ssjs
+++ b/web/lib/topnav_html.ssjs
@@ -56,7 +56,7 @@ if(http_request.virtual_path=="/msgs/subs.ssjs")
 
 if(http_request.virtual_path=="/msgs/subinfo.ssjs" && sub!='mail') {
     template.topnav.push({html: '<a class="tlink" href="/msgs">Message Groups</a><a class="tlink" href="/msgs/subs.ssjs?msg_grp='+template.sub.grp_name+'">'+template.sub.grp_name+'</a>'});
-    template.topnav.push({html: '<a class="tlink" href="/msgs/msgs.ssjs?msg_sub='+template.sub.code+'">'+template.sub.description+'</a><span class="tlink">Sub Information</span>'});
+    template.topnav.push({html: '<a class="tlink" href="/msgs/msgs.ssjs?msg_sub='+encodeURIComponent(template.sub.code)+'">'+template.sub.description+'</a><span class="tlink">Sub Information</span>'});
 }
 
 if(http_request.virtual_path=="/msgs/msgs.ssjs" && sub!='mail')
@@ -115,7 +115,7 @@ if(sub!='mail' && http_request.virtual_path=="/msgs/savemsg.ssjs")
     template.topnav.push({html: '<a class="tlink" href="subs.ssjs?msg_grp='+template.group.name+'">'+template.group.description+'</a>'});
 
 if(sub!='mail' && http_request.virtual_path=="/msgs/savemsg.ssjs")
-    template.topnav.push({html: '<a class="tlink" href="msgs.ssjs?msg_grp='+template.sub.name+'">'+template.sub.description+'</a>'});
+    template.topnav.push({html: '<a class="tlink" href="msgs.ssjs?msg_sub='+encodeURIComponent(template.sub.code)+'">'+template.sub.description+'</a>'});
 
 if(sub!='mail' && http_request.virtual_path=="/msgs/savemsg.ssjs")
     template.topnav.push({html: '<span class="tlink">Posted Message</span>'});