diff --git a/app/assets/javascripts/environments/components/environment.js.es6 b/app/assets/javascripts/environments/components/environment.js.es6
index 1db29dd47fb7bde5d496c8c9c058daeb522d5d59..88c3d257ceaae682f07c7a3e4028744fdc085b1d 100644
--- a/app/assets/javascripts/environments/components/environment.js.es6
+++ b/app/assets/javascripts/environments/components/environment.js.es6
@@ -164,8 +164,7 @@
                   {{state.availableCounter}}
                 </span>
               </a>
-            </li>
-            <li v-bind:class="{ 'active' : scope === 'stopped' }">
+            </li><li v-bind:class="{ 'active' : scope === 'stopped' }">
               <a :href="projectStoppedEnvironmentsPath">
                 Stopped
                 <span class="badge js-stopped-environments-count">
diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml
index 824edd171f3672d3192f5a6b0eb67ffe625b9ef9..0a954c20fcdff8ddacf116776d0d398ab81e5aed 100644
--- a/app/views/admin/logs/show.html.haml
+++ b/app/views/admin/logs/show.html.haml
@@ -8,7 +8,7 @@
 %div{ class: container_class }
   %ul.nav-links.log-tabs
     - loggers.each do |klass|
-      %li{ class: (klass == Gitlab::GitLogger ? 'active' : '') }
+      %li{ class: (klass == Gitlab::GitLogger ? 'active' : '') }>
         = link_to klass::file_name, "##{klass::file_name_noext}",
             'data-toggle' => 'tab'
   .row-content-block
diff --git a/app/views/dashboard/_activity_head.html.haml b/app/views/dashboard/_activity_head.html.haml
index b78e70ebc1e936554adaf03c090b3ddb0fd65e85..02b94beee928a0e2c031f51cd6daff2597aa918d 100644
--- a/app/views/dashboard/_activity_head.html.haml
+++ b/app/views/dashboard/_activity_head.html.haml
@@ -1,7 +1,7 @@
 %ul.nav-links
-  %li{ class: ("active" unless params[:filter]) }
+  %li{ class: ("active" unless params[:filter]) }>
     = link_to activity_dashboard_path, class: 'shortcuts-activity', data: {placement: 'right'} do
       Your Projects
-  %li{ class: ("active" if params[:filter] == 'starred') }
+  %li{ class: ("active" if params[:filter] == 'starred') }>
     = link_to activity_dashboard_path(filter: 'starred'), data: {placement: 'right'} do
       Starred Projects
diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml
index 62f52086be41ea60027a50633cdd6be005f4b470..ea95e91eada0c7d89b997122ccd507ea60ab37f2 100644
--- a/app/views/dashboard/todos/index.html.haml
+++ b/app/views/dashboard/todos/index.html.haml
@@ -5,14 +5,14 @@
   .top-area
     %ul.nav-links
       - todo_pending_active = ('active' if params[:state].blank? || params[:state] == 'pending')
-      %li{class: "todos-pending #{todo_pending_active}"}
+      %li{class: "todos-pending #{todo_pending_active}"}>
         = link_to todos_filter_path(state: 'pending') do
           %span
             To do
           %span.badge
             = number_with_delimiter(todos_pending_count)
       - todo_done_active = ('active' if params[:state] == 'done')
-      %li{class: "todos-done #{todo_done_active}"}
+      %li{class: "todos-done #{todo_done_active}"}>
         = link_to todos_filter_path(state: 'done') do
           %span
             Done
diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml
index e1e787dbde434306b6bc78ee63d2ad1fe8a426cf..030cd8ef78f6cac3cf04ea50fab1ee961486b50f 100644
--- a/app/views/projects/pipelines/index.html.haml
+++ b/app/views/projects/pipelines/index.html.haml
@@ -5,23 +5,23 @@
 %div{ class: container_class }
   .top-area
     %ul.nav-links
-      %li{class: ('active' if @scope.nil?)}
+      %li{class: ('active' if @scope.nil?)}>
         = link_to project_pipelines_path(@project) do
           All
           %span.badge.js-totalbuilds-count
             = number_with_delimiter(@pipelines_count)
 
-      %li{class: ('active' if @scope == 'running')}
+      %li{class: ('active' if @scope == 'running')}>
         = link_to project_pipelines_path(@project, scope: :running) do
           Running
           %span.badge.js-running-count
             = number_with_delimiter(@running_or_pending_count)
 
-      %li{class: ('active' if @scope == 'branches')}
+      %li{class: ('active' if @scope == 'branches')}>
         = link_to project_pipelines_path(@project, scope: :branches) do
           Branches
 
-      %li{class: ('active' if @scope == 'tags')}
+      %li{class: ('active' if @scope == 'tags')}>
         = link_to project_pipelines_path(@project, scope: :tags) do
           Tags
 
diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml
index 73d288e22366f32229b4761c5e2032691b4d81d1..186ed4a7c8b0147f520756e226ba25febd28e7b2 100644
--- a/app/views/shared/_milestones_filter.html.haml
+++ b/app/views/shared/_milestones_filter.html.haml
@@ -2,17 +2,17 @@
   - counts = milestone_counts(@project.milestones)
 
 %ul.nav-links
-  %li{class: milestone_class_for_state(params[:state], 'opened', true)}
+  %li{class: milestone_class_for_state(params[:state], 'opened', true)}>
     = link_to milestones_filter_path(state: 'opened') do
       Open
       - if @project
         %span.badge #{counts[:opened]}
-  %li{class: milestone_class_for_state(params[:state], 'closed')}
+  %li{class: milestone_class_for_state(params[:state], 'closed')}>
     = link_to milestones_filter_path(state: 'closed') do
       Closed
       - if @project
         %span.badge #{counts[:closed]}
-  %li{class: milestone_class_for_state(params[:state], 'all')}
+  %li{class: milestone_class_for_state(params[:state], 'all')}>
     = link_to milestones_filter_path(state: 'all') do
       All
       - if @project
diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml
index 60353aee7f15750eaf4611a954771dc9fda6a6dd..b6047ece5927b66b5ae113a44f4a6b542fa8381d 100644
--- a/app/views/shared/builds/_tabs.html.haml
+++ b/app/views/shared/builds/_tabs.html.haml
@@ -1,23 +1,23 @@
 %ul.nav-links
-  %li{ class: ('active' if scope.nil?) }
+  %li{ class: ('active' if scope.nil?) }>
     = link_to build_path_proc.call(nil) do
       All
       %span.badge.js-totalbuilds-count
         = number_with_delimiter(all_builds.count(:id))
 
-  %li{ class: ('active' if scope == 'pending') }
+  %li{ class: ('active' if scope == 'pending') }>
     = link_to build_path_proc.call('pending') do
       Pending
       %span.badge
         = number_with_delimiter(all_builds.pending.count(:id))
 
-  %li{ class: ('active' if scope == 'running') }
+  %li{ class: ('active' if scope == 'running') }>
     = link_to build_path_proc.call('running') do
       Running
       %span.badge
         = number_with_delimiter(all_builds.running.count(:id))
 
-  %li{ class: ('active' if scope == 'finished') }
+  %li{ class: ('active' if scope == 'finished') }>
     = link_to build_path_proc.call('finished') do
       Finished
       %span.badge
diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml
index 0af92b595848f7606900243c25ed64bc7cd78d47..d938edf4dbdd8a5d5d73930f53cffe215417e7bb 100644
--- a/app/views/shared/issuable/_nav.html.haml
+++ b/app/views/shared/issuable/_nav.html.haml
@@ -3,23 +3,23 @@
 - issuables = @issues || @merge_requests
 
 %ul.nav-links.issues-state-filters
-  %li{class: ("active" if params[:state] == 'opened')}
+  %li{class: ("active" if params[:state] == 'opened')}>
     = link_to page_filter_path(state: 'opened', label: true), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened." do
       #{issuables_state_counter_text(type, :opened)}
 
   - if type == :merge_requests
-    %li{class: ("active" if params[:state] == 'merged')}
+    %li{class: ("active" if params[:state] == 'merged')}>
       = link_to page_filter_path(state: 'merged', label: true), id: 'state-merged', title: 'Filter by merge requests that are currently merged.' do
         #{issuables_state_counter_text(type, :merged)}
 
-    %li{class: ("active" if params[:state] == 'closed')}
+    %li{class: ("active" if params[:state] == 'closed')}>
       = link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.' do
         #{issuables_state_counter_text(type, :closed)}
   - else
-    %li{class: ("active" if params[:state] == 'closed')}
+    %li{class: ("active" if params[:state] == 'closed')}>
       = link_to page_filter_path(state: 'closed', label: true), id: 'state-all', title: 'Filter by issues that are currently closed.' do
         #{issuables_state_counter_text(type, :closed)}
 
-  %li{class: ("active" if params[:state] == 'all')}
+  %li{class: ("active" if params[:state] == 'all')}>
     = link_to page_filter_path(state: 'all', label: true), id: 'state-all', title: "Show all #{page_context_word}." do
       #{issuables_state_counter_text(type, :all)}