From 1e7b8068ea7669fd0333ea8ee4a4feec4ec92512 Mon Sep 17 00:00:00 2001 From: Chris Pymm Date: Fri, 19 Apr 2024 15:43:49 +0100 Subject: [PATCH 1/2] Remove spans from wihtin editable elements --- app/helpers/metadata_presenter/application_helper.rb | 2 +- .../metadata_presenter/attribute/_heading.html.erb | 12 +++++------- .../metadata_presenter/attribute/_lede.html.erb | 2 -- .../metadata_presenter/page/checkanswers.html.erb | 12 ++++-------- .../metadata_presenter/page/confirmation.html.erb | 6 ++---- app/views/metadata_presenter/page/content.html.erb | 5 ++--- app/views/metadata_presenter/page/exit.html.erb | 6 ++---- .../metadata_presenter/page/standalone.html.erb | 3 +-- 8 files changed, 17 insertions(+), 31 deletions(-) diff --git a/app/helpers/metadata_presenter/application_helper.rb b/app/helpers/metadata_presenter/application_helper.rb index 5180a24e..930e4bd6 100644 --- a/app/helpers/metadata_presenter/application_helper.rb +++ b/app/helpers/metadata_presenter/application_helper.rb @@ -6,7 +6,7 @@ module ApplicationHelper def main_title(component:, tag: :h1, classes: 'govuk-heading-xl') content_tag(tag, class: classes) do - content_tag(:span, component.humanised_title) + component.humanised_title end end diff --git a/app/views/metadata_presenter/attribute/_heading.html.erb b/app/views/metadata_presenter/attribute/_heading.html.erb index e424d7f9..966d0e22 100644 --- a/app/views/metadata_presenter/attribute/_heading.html.erb +++ b/app/views/metadata_presenter/attribute/_heading.html.erb @@ -1,9 +1,7 @@ -

- - <%= @page.heading %> - +

+ <%= @page.heading %>

diff --git a/app/views/metadata_presenter/attribute/_lede.html.erb b/app/views/metadata_presenter/attribute/_lede.html.erb index 5cb0b18f..ab7f0740 100644 --- a/app/views/metadata_presenter/attribute/_lede.html.erb +++ b/app/views/metadata_presenter/attribute/_lede.html.erb @@ -3,8 +3,6 @@ data-fb-content-id="page[lede]" data-fb-content-type="element" data-fb-default-text="<%= default_text('lede') %>"> -
<%= @page.lede %> -
<%- end %> diff --git a/app/views/metadata_presenter/page/checkanswers.html.erb b/app/views/metadata_presenter/page/checkanswers.html.erb index 3be9a773..5833aa18 100644 --- a/app/views/metadata_presenter/page/checkanswers.html.erb +++ b/app/views/metadata_presenter/page/checkanswers.html.erb @@ -4,14 +4,12 @@ <%= render partial:'metadata_presenter/component/conditional_component_banner'%> -

- <%= @page.heading %> - -

+ <%= form_for @page, url: reserved_submissions_path, authenticity_token: false, html: { id: 'answers-form' } do |f| %> <%= hidden_field_tag :authenticity_token, form_authenticity_token -%> @@ -65,13 +63,11 @@ <% if @page.send_heading.present? %> -

- <%= @page.send_heading %> - -

+ <% end %> <% if @page.send_body.present? %> diff --git a/app/views/metadata_presenter/page/confirmation.html.erb b/app/views/metadata_presenter/page/confirmation.html.erb index 6680de53..ab7b008b 100644 --- a/app/views/metadata_presenter/page/confirmation.html.erb +++ b/app/views/metadata_presenter/page/confirmation.html.erb @@ -8,8 +8,7 @@ <% else %>
<% end %> -

- @@ -18,8 +17,7 @@ <% else %> <%= @page.heading %> <% end %> - -

+
<% if reference_number_enabled? %> diff --git a/app/views/metadata_presenter/page/content.html.erb b/app/views/metadata_presenter/page/content.html.erb index 1140af1c..71d7b933 100644 --- a/app/views/metadata_presenter/page/content.html.erb +++ b/app/views/metadata_presenter/page/content.html.erb @@ -9,13 +9,12 @@ <%= render 'metadata_presenter/attribute/section_heading' %> -

- <%= @page.heading %> -

<%= render 'metadata_presenter/attribute/lede' %> diff --git a/app/views/metadata_presenter/page/exit.html.erb b/app/views/metadata_presenter/page/exit.html.erb index dcd2fa25..da117044 100644 --- a/app/views/metadata_presenter/page/exit.html.erb +++ b/app/views/metadata_presenter/page/exit.html.erb @@ -6,14 +6,12 @@ <%= render 'metadata_presenter/attribute/section_heading' %> -

- <%= @page.heading %> - -

+ <%= render 'metadata_presenter/attribute/lede' %> diff --git a/app/views/metadata_presenter/page/standalone.html.erb b/app/views/metadata_presenter/page/standalone.html.erb index 09dec9de..d4fd616a 100644 --- a/app/views/metadata_presenter/page/standalone.html.erb +++ b/app/views/metadata_presenter/page/standalone.html.erb @@ -29,12 +29,11 @@ <% end %> <%# ORIGINAL TEMPLATE: Uses content from form metadata %> <% if @page.heading %> -

"> <%= @page.heading %> -

<% end %> <%= render 'metadata_presenter/attribute/body' %> From cf60453bebdd0d957ac6d8610ce0a085ec87b23b Mon Sep 17 00:00:00 2001 From: Chris Pymm Date: Mon, 29 Apr 2024 14:17:38 +0100 Subject: [PATCH 2/2] bump version to 3.3.36 --- CHANGELOG.md | 4 ++++ lib/metadata_presenter/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 461aac0a..640fa6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file. ### Changed ### Fixed +## [3.3.36] - 2023-04-29 +### Changed + - Removed elements from within editable headings, as Editor has been updated to inject them + ## [3.3.35] - 2024-04-25 ### Fixed - Fixed an issue with the back link in save and return pages and prevented an error when access email confirmation page when session cannot be loaded diff --git a/lib/metadata_presenter/version.rb b/lib/metadata_presenter/version.rb index 9158d41c..a6d616aa 100644 --- a/lib/metadata_presenter/version.rb +++ b/lib/metadata_presenter/version.rb @@ -1,3 +1,3 @@ module MetadataPresenter - VERSION = '3.3.35'.freeze + VERSION = '3.3.36'.freeze end