Skip to content

Conversation

@ian-noaa
Copy link
Collaborator

@ian-noaa ian-noaa commented Oct 1, 2025

The latest shutdown banner needed some HTML formatting to enable <br> and <a> tags. The easiest way forward is to allow raw HTML in that config file. This should be safe, as we control the settings.

@ian-noaa ian-noaa self-assigned this Oct 1, 2025
@ian-noaa ian-noaa linked an issue Oct 1, 2025 that may be closed by this pull request
@ian-noaa ian-noaa requested a review from Copilot October 1, 2025 18:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Allows the alert_message configuration value to render trusted raw HTML (e.g.,
, ) in the shutdown banner.

  • Added a template helper (displayAsRawHTML) returning template.HTML and registered it with Gin.
  • Updated alert.html to pipe AlertMessage through the new helper for unescaped rendering.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
home/main.go Adds displayAsRawHTML helper and registers it in the Gin template func map.
home/templates/alert.html Uses the new helper to render the configured alert message as raw HTML.

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

The latest shutdown banner needed some HTML formatting to enable <br>
and <a> tags. The easiest way forward is to allow raw HTML in that
config file. This should be safe, as we control the settings.
@ian-noaa ian-noaa force-pushed the support-html-in-alerts branch from 44608a2 to b75ad48 Compare October 1, 2025 18:56
@ian-noaa ian-noaa requested a review from Copilot October 1, 2025 18:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@mollybsmith-noaa mollybsmith-noaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@ian-noaa ian-noaa merged commit 5bf26c3 into development Oct 1, 2025
9 checks passed
@ian-noaa ian-noaa deleted the support-html-in-alerts branch October 1, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support additional formatting in the home page banner

3 participants