From 8378e6d629bf1dd604e773d4eaaa37170aab981c Mon Sep 17 00:00:00 2001
From: Alexander Brandon Coles
Date: Sat, 20 Dec 2025 17:49:51 -0300
Subject: [PATCH] Fix illegal HTML nesting (Herb Compilation errors)
Fixes `InvalidNestingError` found when running:
herb analyze .
---
app/views/admin/backups/show.html.erb | 36 +++++++++----------
.../activation_limit_reached.html.erb | 24 ++++++-------
.../user_mailer/attachments_added.html.erb | 19 +++++-----
.../views/help/wiki_syntax_detailed.html.erb | 8 ++---
4 files changed, 41 insertions(+), 46 deletions(-)
diff --git a/app/views/admin/backups/show.html.erb b/app/views/admin/backups/show.html.erb
index cd098e289e1..c2a260efd30 100644
--- a/app/views/admin/backups/show.html.erb
+++ b/app/views/admin/backups/show.html.erb
@@ -1,4 +1,4 @@
-<%#-- copyright
+<%# -- copyright
OpenProject is an open source project management software.
Copyright (C) the OpenProject GmbH
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
-++#%>
+++# %>
<% html_title t(:label_administration), t(:label_backup) -%>
@@ -36,24 +36,22 @@ See COPYRIGHT and LICENSE files for more details.
<% if Token::Backup.count > 0 %>
-
- <%= I18n.t("backup.label_token_users") %>:
+ <%= I18n.t("backup.label_token_users") %>:
-
-
- <% Token::Backup.includes(:user).each do |token| %>
- -
- <% if current_user.allowed_globally?(:manage_user) %>
- <%= link_to token.user.name, edit_user_path(token.user) %>
- <% else %>
- <%= token.user.name %>
- <% end %>
- <%= token.user == current_user ? "(#{I18n.t(:you)})" : "" %>
-
- <% end %>
-
-
-
+
+
+ <% Token::Backup.includes(:user).each do |token| %>
+ -
+ <% if current_user.allowed_globally?(:manage_user) %>
+ <%= link_to token.user.name, edit_user_path(token.user) %>
+ <% else %>
+ <%= token.user.name %>
+ <% end %>
+ <%= token.user == current_user ? "(#{I18n.t(:you)})" : "" %>
+
+ <% end %>
+
+
<% end %>
<% if @backup_token.present? %>
diff --git a/app/views/user_mailer/activation_limit_reached.html.erb b/app/views/user_mailer/activation_limit_reached.html.erb
index e506f0f5847..e122b345f57 100644
--- a/app/views/user_mailer/activation_limit_reached.html.erb
+++ b/app/views/user_mailer/activation_limit_reached.html.erb
@@ -1,4 +1,4 @@
-<%#-- copyright
+<%# -- copyright
OpenProject is an open source project management software.
Copyright (C) the OpenProject GmbH
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
-++#%>
+++# %>
<% mail_link = "#{@email}" %>
@@ -34,14 +34,12 @@ See COPYRIGHT and LICENSE files for more details.
<%= t("mail_user_activation_limit_reached.message", email: mail_link, host: host_link).html_safe %>
-
- <%= t("mail_user_activation_limit_reached.steps.label") %>
-
- -
- <%= link_translate("mail_user_activation_limit_reached.steps.a", links: { upgrade_url: OpenProject::Enterprise.upgrade_url }) %>
-
- -
- <%= link_translate("mail_user_activation_limit_reached.steps.b", links: { users_url: users_url }) %>
-
-
-
+<%= t("mail_user_activation_limit_reached.steps.label") %>
+
+ -
+ <%= link_translate("mail_user_activation_limit_reached.steps.a", links: { upgrade_url: OpenProject::Enterprise.upgrade_url }) %>
+
+ -
+ <%= link_translate("mail_user_activation_limit_reached.steps.b", links: { users_url: users_url }) %>
+
+
diff --git a/app/views/user_mailer/attachments_added.html.erb b/app/views/user_mailer/attachments_added.html.erb
index e1cdc5c6e55..b58d342a306 100644
--- a/app/views/user_mailer/attachments_added.html.erb
+++ b/app/views/user_mailer/attachments_added.html.erb
@@ -1,4 +1,4 @@
-<%#-- copyright
+<%# -- copyright
OpenProject is an open source project management software.
Copyright (C) the OpenProject GmbH
@@ -25,13 +25,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
-++#%>
+++# %>
-
- <%= link_to @added_to, @added_to_url %>
-
- <% @attachments.each do |attachment | %>
- - <%= attachment.filename %>
- <% end %>
-
-
+
+<%= link_to @added_to, @added_to_url %>
+
+ <% @attachments.each do |attachment | %>
+ - <%= attachment.filename %>
+ <% end %>
+
diff --git a/modules/documents/app/views/help/wiki_syntax_detailed.html.erb b/modules/documents/app/views/help/wiki_syntax_detailed.html.erb
index 2444b4e1614..9fce590c933 100644
--- a/modules/documents/app/views/help/wiki_syntax_detailed.html.erb
+++ b/modules/documents/app/views/help/wiki_syntax_detailed.html.erb
@@ -1,4 +1,4 @@
-<%#-- copyright
+<%# -- copyright
OpenProject is an open source project management software.
Copyright (C) the OpenProject GmbH
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
-++#%>
+++# %>
<% content_for :styles do %>
body { font:80% Verdana,Tahoma,Arial,sans-serif; }
@@ -253,9 +253,9 @@ To go live, all you need to add is a database and a web server.
OpenProject has the following builtin macros:
- hello_worldSample macro.
includeInclude a wiki page. Example:
+ hello_worldSample macro.
includeInclude a wiki page. Example:
- {{include(Foo)}}
macro_listDisplays a list of all available macros, including description if available.
+ {{include(Foo)}}
macro_listDisplays a list of all available macros, including description if available.
Code highlighting